| Safe Haskell | None |
|---|
Debian.Relation
Contents
Description
A module for working with debian relationships http://www.debian.org/doc/debian-policy/ch-relationships.html
- class Pretty a => PkgName a where
- pkgNameFromString :: String -> a
- newtype SrcPkgName = SrcPkgName {}
- newtype BinPkgName = BinPkgName {}
- type Relations = AndRelation
- type AndRelation = [OrRelation]
- type OrRelation = [Relation]
- prettyOrRelation :: [Relation] -> Doc
- prettyRelations :: [[Relation]] -> Doc
- data Relation = Rel BinPkgName (Maybe VersionReq) (Maybe ArchitectureReq)
- data ArchitectureReq
- = ArchOnly [String]
- | ArchExcept [String]
- data VersionReq
- checkVersionReq :: Maybe VersionReq -> Maybe DebianVersion -> Bool
- type RelParser a = CharParser () a
- class ParseRelations a where
- parseRelations :: a -> Either ParseError Relations
Types
type Relations = AndRelationSource
type AndRelation = [OrRelation]Source
type OrRelation = [Relation]Source
prettyOrRelation :: [Relation] -> DocSource
prettyRelations :: [[Relation]] -> DocSource
This needs to be indented for use in a control file: intercalate n . lines . show
Constructors
| Rel BinPkgName (Maybe VersionReq) (Maybe ArchitectureReq) |
data ArchitectureReq Source
Constructors
| ArchOnly [String] | |
| ArchExcept [String] |
data VersionReq Source
Constructors
| SLT DebianVersion | |
| LTE DebianVersion | |
| EEQ DebianVersion | |
| GRE DebianVersion | |
| SGR DebianVersion |
Instances
| Eq VersionReq | |
| Ord VersionReq | The sort order is based on version number first, then on the kind of relation, sorting in the order <= , ==,= , >> |
| Show VersionReq | |
| Pretty VersionReq |
Helper Functions
checkVersionReq :: Maybe VersionReq -> Maybe DebianVersion -> BoolSource
Check if a version number satisfies a version requirement.
Relation Parser
type RelParser a = CharParser () aSource
class ParseRelations a whereSource
Methods
parseRelations :: a -> Either ParseError RelationsSource
parseRelations parse a debian relation (i.e. the value of a
Depends field). Return a parsec error or a value of type
Relations
Instances