debian-4.0.2: Modules for working with the Debian package system
Safe HaskellNone
LanguageHaskell98

Debian.Relation.Common

Synopsis

Documentation

data Relation Source #

Constructors

Rel BinPkgName (Maybe VersionReq) (Maybe ArchitectureReq) 

Instances

Instances details
Eq Relation Source # 
Instance details

Defined in Debian.Relation.Common

Methods

(==) :: Relation -> Relation -> Bool

(/=) :: Relation -> Relation -> Bool

Ord Relation Source # 
Instance details

Defined in Debian.Relation.Common

Methods

compare :: Relation -> Relation -> Ordering

(<) :: Relation -> Relation -> Bool

(<=) :: Relation -> Relation -> Bool

(>) :: Relation -> Relation -> Bool

(>=) :: Relation -> Relation -> Bool

max :: Relation -> Relation -> Relation

min :: Relation -> Relation -> Relation

Read Relation Source # 
Instance details

Defined in Debian.Relation.Common

Methods

readsPrec :: Int -> ReadS Relation

readList :: ReadS [Relation]

readPrec :: ReadPrec Relation

readListPrec :: ReadPrec [Relation]

Show Relation Source # 
Instance details

Defined in Debian.Relation.Common

Methods

showsPrec :: Int -> Relation -> ShowS

show :: Relation -> String

showList :: [Relation] -> ShowS

Pretty (PP Relation) Source # 
Instance details

Defined in Debian.Relation.Common

Methods

pretty :: PP Relation -> Doc

prettyVersioned :: CabalSpecVersion -> PP Relation -> Doc

Pretty (PP OrRelation) Source # 
Instance details

Defined in Debian.Relation.Common

Methods

pretty :: PP OrRelation -> Doc

prettyVersioned :: CabalSpecVersion -> PP OrRelation -> Doc

Pretty (PP Relations) Source #

Wrap PP around type synonyms that might overlap with the `Pretty [a]` instance.

Instance details

Defined in Debian.Relation.Common

Methods

pretty :: PP Relations -> Doc

prettyVersioned :: CabalSpecVersion -> PP Relations -> Doc

newtype SrcPkgName Source #

Constructors

SrcPkgName 

Fields

Instances

Instances details
Eq SrcPkgName Source # 
Instance details

Defined in Debian.Relation.Common

Methods

(==) :: SrcPkgName -> SrcPkgName -> Bool

(/=) :: SrcPkgName -> SrcPkgName -> Bool

Data SrcPkgName Source # 
Instance details

Defined in Debian.Relation.Common

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SrcPkgName -> c SrcPkgName

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SrcPkgName

toConstr :: SrcPkgName -> Constr

dataTypeOf :: SrcPkgName -> DataType

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c SrcPkgName)

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SrcPkgName)

gmapT :: (forall b. Data b => b -> b) -> SrcPkgName -> SrcPkgName

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SrcPkgName -> r

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SrcPkgName -> r

gmapQ :: (forall d. Data d => d -> u) -> SrcPkgName -> [u]

gmapQi :: Int -> (forall d. Data d => d -> u) -> SrcPkgName -> u

gmapM :: Monad m => (forall d. Data d => d -> m d) -> SrcPkgName -> m SrcPkgName

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SrcPkgName -> m SrcPkgName

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SrcPkgName -> m SrcPkgName

Ord SrcPkgName Source # 
Instance details

Defined in Debian.Relation.Common

Read SrcPkgName Source # 
Instance details

Defined in Debian.Relation.Common

Methods

readsPrec :: Int -> ReadS SrcPkgName

readList :: ReadS [SrcPkgName]

readPrec :: ReadPrec SrcPkgName

readListPrec :: ReadPrec [SrcPkgName]

Show SrcPkgName Source # 
Instance details

Defined in Debian.Relation.Common

Methods

showsPrec :: Int -> SrcPkgName -> ShowS

show :: SrcPkgName -> String

showList :: [SrcPkgName] -> ShowS

PkgName SrcPkgName Source # 
Instance details

Defined in Debian.Relation.Common

Methods

pkgNameFromString :: String -> SrcPkgName Source #

Pretty (PP SrcPkgName) Source # 
Instance details

Defined in Debian.Relation.Common

Methods

pretty :: PP SrcPkgName -> Doc

prettyVersioned :: CabalSpecVersion -> PP SrcPkgName -> Doc

newtype BinPkgName Source #

Constructors

BinPkgName 

Fields

Instances

Instances details
Eq BinPkgName Source # 
Instance details

Defined in Debian.Relation.Common

Methods

(==) :: BinPkgName -> BinPkgName -> Bool

(/=) :: BinPkgName -> BinPkgName -> Bool

Data BinPkgName Source # 
Instance details

Defined in Debian.Relation.Common

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> BinPkgName -> c BinPkgName

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c BinPkgName

toConstr :: BinPkgName -> Constr

dataTypeOf :: BinPkgName -> DataType

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c BinPkgName)

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c BinPkgName)

gmapT :: (forall b. Data b => b -> b) -> BinPkgName -> BinPkgName

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> BinPkgName -> r

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> BinPkgName -> r

gmapQ :: (forall d. Data d => d -> u) -> BinPkgName -> [u]

gmapQi :: Int -> (forall d. Data d => d -> u) -> BinPkgName -> u

gmapM :: Monad m => (forall d. Data d => d -> m d) -> BinPkgName -> m BinPkgName

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> BinPkgName -> m BinPkgName

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> BinPkgName -> m BinPkgName

Ord BinPkgName Source # 
Instance details

Defined in Debian.Relation.Common

Read BinPkgName Source # 
Instance details

Defined in Debian.Relation.Common

Methods

readsPrec :: Int -> ReadS BinPkgName

readList :: ReadS [BinPkgName]

readPrec :: ReadPrec BinPkgName

readListPrec :: ReadPrec [BinPkgName]

Show BinPkgName Source # 
Instance details

Defined in Debian.Relation.Common

Methods

showsPrec :: Int -> BinPkgName -> ShowS

show :: BinPkgName -> String

showList :: [BinPkgName] -> ShowS

PkgName BinPkgName Source # 
Instance details

Defined in Debian.Relation.Common

Methods

pkgNameFromString :: String -> BinPkgName Source #

Pretty (PP BinPkgName) Source # 
Instance details

Defined in Debian.Relation.Common

Methods

pretty :: PP BinPkgName -> Doc

prettyVersioned :: CabalSpecVersion -> PP BinPkgName -> Doc

class Pretty (PP a) => PkgName a where Source #

Methods

pkgNameFromString :: String -> a Source #

Instances

Instances details
PkgName BinPkgName Source # 
Instance details

Defined in Debian.Relation.Common

Methods

pkgNameFromString :: String -> BinPkgName Source #

PkgName SrcPkgName Source # 
Instance details

Defined in Debian.Relation.Common

Methods

pkgNameFromString :: String -> SrcPkgName 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

Instances details
ParseRelations String Source # 
Instance details

Defined in Debian.Relation.String

Methods

parseRelations :: String -> Either ParseError Relations Source #

ParseRelations Text Source # 
Instance details

Defined in Debian.Relation.Text

Methods

parseRelations :: Text -> Either ParseError Relations Source #

ParseRelations ByteString Source # 
Instance details

Defined in Debian.Relation.ByteString

Methods

parseRelations :: ByteString -> Either ParseError Relations Source #

prettyRelations :: [[Relation]] -> Doc Source #

This needs to be indented for use in a control file: intercalate "n " . lines . show

data ArchitectureReq Source #

Constructors

ArchOnly (Set Arch) 
ArchExcept (Set Arch) 

Instances

Instances details
Eq ArchitectureReq Source # 
Instance details

Defined in Debian.Relation.Common

Ord ArchitectureReq Source # 
Instance details

Defined in Debian.Relation.Common

Read ArchitectureReq Source # 
Instance details

Defined in Debian.Relation.Common

Show ArchitectureReq Source # 
Instance details

Defined in Debian.Relation.Common

Methods

showsPrec :: Int -> ArchitectureReq -> ShowS

show :: ArchitectureReq -> String

showList :: [ArchitectureReq] -> ShowS

Pretty (PP ArchitectureReq) Source # 
Instance details

Defined in Debian.Relation.Common

Methods

pretty :: PP ArchitectureReq -> Doc

prettyVersioned :: CabalSpecVersion -> PP ArchitectureReq -> Doc

data VersionReq Source #

Instances

Instances details
Eq VersionReq Source # 
Instance details

Defined in Debian.Relation.Common

Methods

(==) :: VersionReq -> VersionReq -> Bool

(/=) :: VersionReq -> VersionReq -> Bool

Ord VersionReq Source #

The sort order is based on version number first, then on the kind of relation, sorting in the order

Instance details

Defined in Debian.Relation.Common

Read VersionReq Source # 
Instance details

Defined in Debian.Relation.Common

Methods

readsPrec :: Int -> ReadS VersionReq

readList :: ReadS [VersionReq]

readPrec :: ReadPrec VersionReq

readListPrec :: ReadPrec [VersionReq]

Show VersionReq Source # 
Instance details

Defined in Debian.Relation.Common

Methods

showsPrec :: Int -> VersionReq -> ShowS

show :: VersionReq -> String

showList :: [VersionReq] -> ShowS

Pretty (PP VersionReq) Source # 
Instance details

Defined in Debian.Relation.Common

Methods

pretty :: PP VersionReq -> Doc

prettyVersioned :: CabalSpecVersion -> PP VersionReq -> Doc

checkVersionReq :: Maybe VersionReq -> Maybe DebianVersion -> Bool Source #

Check if a version number satisfies a version requirement.