Safe Haskell | None |
---|---|
Language | Haskell98 |
Debian.Relation
Description
A module for working with debian relationships http://www.debian.org/doc/debian-policy/ch-relationships.html
Synopsis
- class Pretty (PP a) => PkgName a where
- pkgNameFromString :: String -> a
- newtype SrcPkgName = SrcPkgName {}
- newtype BinPkgName = BinPkgName {}
- type Relations = AndRelation
- type AndRelation = [OrRelation]
- type OrRelation = [Relation]
- data Relation = Rel BinPkgName (Maybe VersionReq) (Maybe ArchitectureReq)
- data ArchitectureReq
- data Arch
- data ArchOS
- data ArchCPU
- data VersionReq
- checkVersionReq :: Maybe VersionReq -> Maybe DebianVersion -> Bool
- type RelParser a = CharParser () a
- class ParseRelations a where
- parseRelations :: a -> Either ParseError Relations
Types
class Pretty (PP a) => PkgName a where Source #
Methods
pkgNameFromString :: String -> a Source #
Instances
PkgName BinPkgName Source # | |
Defined in Debian.Relation.Common Methods pkgNameFromString :: String -> BinPkgName Source # | |
PkgName SrcPkgName Source # | |
Defined in Debian.Relation.Common Methods pkgNameFromString :: String -> SrcPkgName Source # |
newtype SrcPkgName Source #
Constructors
SrcPkgName | |
Fields |
Instances
newtype BinPkgName Source #
Constructors
BinPkgName | |
Fields |
Instances
type Relations = AndRelation Source #
type AndRelation = [OrRelation] Source #
type OrRelation = [Relation] Source #
Constructors
Rel BinPkgName (Maybe VersionReq) (Maybe ArchitectureReq) |
Instances
Eq Relation Source # | |
Ord Relation Source # | |
Defined in Debian.Relation.Common | |
Read Relation Source # | |
Show Relation Source # | |
Pretty (PP Relation) Source # | |
Pretty (PP OrRelation) Source # | |
Defined in Debian.Relation.Common | |
Pretty (PP Relations) Source # | Wrap |
data ArchitectureReq Source #
Instances
Eq ArchitectureReq Source # | |
Defined in Debian.Relation.Common Methods (==) :: ArchitectureReq -> ArchitectureReq -> Bool Source # (/=) :: ArchitectureReq -> ArchitectureReq -> Bool Source # | |
Ord ArchitectureReq Source # | |
Defined in Debian.Relation.Common Methods compare :: ArchitectureReq -> ArchitectureReq -> Ordering Source # (<) :: ArchitectureReq -> ArchitectureReq -> Bool Source # (<=) :: ArchitectureReq -> ArchitectureReq -> Bool Source # (>) :: ArchitectureReq -> ArchitectureReq -> Bool Source # (>=) :: ArchitectureReq -> ArchitectureReq -> Bool Source # max :: ArchitectureReq -> ArchitectureReq -> ArchitectureReq Source # min :: ArchitectureReq -> ArchitectureReq -> ArchitectureReq Source # | |
Read ArchitectureReq Source # | |
Defined in Debian.Relation.Common | |
Show ArchitectureReq Source # | |
Defined in Debian.Relation.Common | |
Pretty (PP ArchitectureReq) Source # | |
Defined in Debian.Relation.Common |
Instances
Eq Arch Source # | |
Data Arch Source # | |
Defined in Debian.Arch Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Arch -> c Arch Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Arch Source # toConstr :: Arch -> Constr Source # dataTypeOf :: Arch -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Arch) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Arch) Source # gmapT :: (forall b. Data b => b -> b) -> Arch -> Arch Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Arch -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Arch -> r Source # gmapQ :: (forall d. Data d => d -> u) -> Arch -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> Arch -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Arch -> m Arch Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Arch -> m Arch Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Arch -> m Arch Source # | |
Ord Arch Source # | |
Read Arch Source # | |
Show Arch Source # | |
Instances
Eq ArchOS Source # | |
Data ArchOS Source # | |
Defined in Debian.Arch Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ArchOS -> c ArchOS Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ArchOS Source # toConstr :: ArchOS -> Constr Source # dataTypeOf :: ArchOS -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ArchOS) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ArchOS) Source # gmapT :: (forall b. Data b => b -> b) -> ArchOS -> ArchOS Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ArchOS -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ArchOS -> r Source # gmapQ :: (forall d. Data d => d -> u) -> ArchOS -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> ArchOS -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ArchOS -> m ArchOS Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ArchOS -> m ArchOS Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ArchOS -> m ArchOS Source # | |
Ord ArchOS Source # | |
Read ArchOS Source # | |
Show ArchOS Source # | |
Constructors
ArchCPU String | |
ArchCPUAny |
Instances
Eq ArchCPU Source # | |
Data ArchCPU Source # | |
Defined in Debian.Arch Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ArchCPU -> c ArchCPU Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ArchCPU Source # toConstr :: ArchCPU -> Constr Source # dataTypeOf :: ArchCPU -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ArchCPU) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ArchCPU) Source # gmapT :: (forall b. Data b => b -> b) -> ArchCPU -> ArchCPU Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ArchCPU -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ArchCPU -> r Source # gmapQ :: (forall d. Data d => d -> u) -> ArchCPU -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> ArchCPU -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ArchCPU -> m ArchCPU Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ArchCPU -> m ArchCPU Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ArchCPU -> m ArchCPU Source # | |
Ord ArchCPU Source # | |
Read ArchCPU Source # | |
Show ArchCPU Source # | |
data VersionReq Source #
Constructors
SLT DebianVersion | |
LTE DebianVersion | |
EEQ DebianVersion | |
GRE DebianVersion | |
SGR DebianVersion |
Instances
Eq VersionReq Source # | |
Defined in Debian.Relation.Common Methods (==) :: VersionReq -> VersionReq -> Bool Source # (/=) :: VersionReq -> VersionReq -> Bool Source # | |
Ord VersionReq Source # | The sort order is based on version number first, then on the kind of
relation, sorting in the order |
Defined in Debian.Relation.Common Methods compare :: VersionReq -> VersionReq -> Ordering Source # (<) :: VersionReq -> VersionReq -> Bool Source # (<=) :: VersionReq -> VersionReq -> Bool Source # (>) :: VersionReq -> VersionReq -> Bool Source # (>=) :: VersionReq -> VersionReq -> Bool Source # max :: VersionReq -> VersionReq -> VersionReq Source # min :: VersionReq -> VersionReq -> VersionReq Source # | |
Read VersionReq Source # | |
Defined in Debian.Relation.Common | |
Show VersionReq Source # | |
Defined in Debian.Relation.Common | |
Pretty (PP VersionReq) Source # | |
Defined in Debian.Relation.Common |
Helper Functions
checkVersionReq :: Maybe VersionReq -> Maybe DebianVersion -> Bool Source #
Check if a version number satisfies a version requirement.
Relation Parser
type RelParser a = CharParser () a Source #
class ParseRelations a where Source #
Methods
parseRelations :: a -> Either ParseError Relations Source #
parseRelations
parse a debian relation (i.e. the value of a
Depends field). Return a parsec error or a value of type
Relations
Instances
ParseRelations ByteString Source # | |
Defined in Debian.Relation.ByteString Methods parseRelations :: ByteString -> Either ParseError Relations Source # | |
ParseRelations String Source # | |
Defined in Debian.Relation.String Methods parseRelations :: String -> Either ParseError Relations Source # | |
ParseRelations Text Source # | |
Defined in Debian.Relation.Text Methods parseRelations :: Text -> Either ParseError Relations Source # |