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

Debian.Sources

Contents

Synopsis

Documentation

data SourceType Source #

Constructors

Deb 
DebSrc 

Instances

Instances details
Eq SourceType Source # 
Instance details

Defined in Debian.Sources

Methods

(==) :: SourceType -> SourceType -> Bool

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

Ord SourceType Source # 
Instance details

Defined in Debian.Sources

Show SourceType Source # 
Instance details

Defined in Debian.Sources

Methods

showsPrec :: Int -> SourceType -> ShowS

show :: SourceType -> String

showList :: [SourceType] -> ShowS

Pretty SourceType Source # 
Instance details

Defined in Debian.Sources

Methods

pretty :: SourceType -> Doc

prettyVersioned :: CabalSpecVersion -> SourceType -> Doc

data SourceOption Source #

Constructors

SourceOption String SourceOp [String] 

Instances

Instances details
Eq SourceOption Source # 
Instance details

Defined in Debian.Sources

Methods

(==) :: SourceOption -> SourceOption -> Bool

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

Ord SourceOption Source # 
Instance details

Defined in Debian.Sources

Show SourceOption Source # 
Instance details

Defined in Debian.Sources

Methods

showsPrec :: Int -> SourceOption -> ShowS

show :: SourceOption -> String

showList :: [SourceOption] -> ShowS

Pretty SourceOption Source # 
Instance details

Defined in Debian.Sources

Methods

pretty :: SourceOption -> Doc

prettyVersioned :: CabalSpecVersion -> SourceOption -> Doc

data SourceOp Source #

Constructors

OpSet 
OpAdd 
OpDel 

Instances

Instances details
Eq SourceOp Source # 
Instance details

Defined in Debian.Sources

Methods

(==) :: SourceOp -> SourceOp -> Bool

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

Ord SourceOp Source # 
Instance details

Defined in Debian.Sources

Methods

compare :: SourceOp -> SourceOp -> Ordering

(<) :: SourceOp -> SourceOp -> Bool

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

(>) :: SourceOp -> SourceOp -> Bool

(>=) :: SourceOp -> SourceOp -> Bool

max :: SourceOp -> SourceOp -> SourceOp

min :: SourceOp -> SourceOp -> SourceOp

Show SourceOp Source # 
Instance details

Defined in Debian.Sources

Methods

showsPrec :: Int -> SourceOp -> ShowS

show :: SourceOp -> String

showList :: [SourceOp] -> ShowS

Pretty SourceOp Source # 
Instance details

Defined in Debian.Sources

Methods

pretty :: SourceOp -> Doc

prettyVersioned :: CabalSpecVersion -> SourceOp -> Doc

data DebSource Source #

Instances

Instances details
Eq DebSource Source # 
Instance details

Defined in Debian.Sources

Methods

(==) :: DebSource -> DebSource -> Bool

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

Ord DebSource Source # 
Instance details

Defined in Debian.Sources

Methods

compare :: DebSource -> DebSource -> Ordering

(<) :: DebSource -> DebSource -> Bool

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

(>) :: DebSource -> DebSource -> Bool

(>=) :: DebSource -> DebSource -> Bool

max :: DebSource -> DebSource -> DebSource

min :: DebSource -> DebSource -> DebSource

Show DebSource Source # 
Instance details

Defined in Debian.Sources

Methods

showsPrec :: Int -> DebSource -> ShowS

show :: DebSource -> String

showList :: [DebSource] -> ShowS

Pretty DebSource Source # 
Instance details

Defined in Debian.Sources

Methods

pretty :: DebSource -> Doc

prettyVersioned :: CabalSpecVersion -> DebSource -> Doc

Pretty (PP [DebSource]) Source # 
Instance details

Defined in Debian.Sources

Methods

pretty :: PP [DebSource] -> Doc

prettyVersioned :: CabalSpecVersion -> PP [DebSource] -> Doc

quoteWords :: String -> [String] Source #

quoteWords - similar to words, but with special handling of double-quotes and brackets.

The handling double quotes and [] is supposed to match: apt-0.6.44.2/apt-pkg/contrib/strutl.cc:ParseQuoteWord()

The behaviour can be defined as:

Break the string into space seperated words ignoring spaces that appear between "" or []. Strip trailing and leading white space around words. Strip out double quotes, but leave the square brackets intact.

stripLine :: String -> String Source #

sourceLines :: String -> [String] Source #

parseSourceLine :: [Loc] -> String -> DebSource Source #

parseSourceLine -- parses a source line the argument must be a non-empty, valid source line with comments stripped see: sourceLines

parseOptions :: String -> Either ParseError [SourceOption] Source #

pOptions :: CharParser () [SourceOption] Source #

pOption :: CharParser () SourceOption Source #

pOp :: CharParser () SourceOp Source #

parseSourceLine' :: [Loc] -> String -> Either String DebSource Source #

parseSourcesList :: [Loc] -> String -> [DebSource] Source #

Unit Tests