| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Ecluse.Core.Registry.PyPI.FirstParty
Description
PyPI first-party ownership by exact project name or separator-delimited prefix. Exact declarations share the routed grammar in Ecluse.Core.Registry.PyPI.Project.
Synopsis
- data PyPIPrefix
- mkPyPIPrefix :: Text -> Maybe PyPIPrefix
- underPyPIPrefix :: PyPIPrefix -> PackageName -> Bool
- data PyPIFirstParty
- projectFirstPartyEntry :: Text -> Either ParseError PyPIFirstParty
- pypiFirstPartyName :: NonEmpty PyPIFirstParty -> PackageName -> Bool
Name prefixes
data PyPIPrefix Source #
A distribution-name prefix in PEP 503 canonical form.
Instances
| Show PyPIPrefix Source # | |
Defined in Ecluse.Core.Registry.PyPI.FirstParty Methods showsPrec :: Int -> PyPIPrefix -> ShowS # show :: PyPIPrefix -> String # showList :: [PyPIPrefix] -> ShowS # | |
| Eq PyPIPrefix Source # | |
Defined in Ecluse.Core.Registry.PyPI.FirstParty | |
mkPyPIPrefix :: Text -> Maybe PyPIPrefix Source #
Build a canonical prefix, accepting terminal separators.
Empty, separator-only, or non-name text yields Nothing.
underPyPIPrefix :: PyPIPrefix -> PackageName -> Bool Source #
Match at a separator: acme covers acme-tools, excluding acmeco and bare acme.
First-party declarations
data PyPIFirstParty Source #
A distribution or a prefix owned by the deployment.
Constructors
| PyPIOwnedName PackageName | A distribution the deployment owns, matched on its PEP 503 canonical name. |
| PyPIOwnedPrefix PyPIPrefix | A prefix the deployment owns, matched at PEP 503's separator boundary. |
Instances
| Show PyPIFirstParty Source # | |
Defined in Ecluse.Core.Registry.PyPI.FirstParty Methods showsPrec :: Int -> PyPIFirstParty -> ShowS # show :: PyPIFirstParty -> String # showList :: [PyPIFirstParty] -> ShowS # | |
| Eq PyPIFirstParty Source # | |
Defined in Ecluse.Core.Registry.PyPI.FirstParty Methods (==) :: PyPIFirstParty -> PyPIFirstParty -> Bool # (/=) :: PyPIFirstParty -> PyPIFirstParty -> Bool # | |
projectFirstPartyEntry :: Text -> Either ParseError PyPIFirstParty Source #
Parse an exact projectName or a prefix ending in a separator then *.
Refuse acme*, which would otherwise claim names such as acmeco.
pypiFirstPartyName :: NonEmpty PyPIFirstParty -> PackageName -> Bool Source #
Match an exact canonical name or a declared prefix. Deny by default.