Safe Haskell | Safe |
---|---|
Language | Haskell98 |
Debian.Sources
Contents
Synopsis
- data SourceType
- data SourceOption = SourceOption String SourceOp [String]
- data SourceOp
- data DebSource = DebSource {
- sourceType :: SourceType
- sourceOptions :: [SourceOption]
- sourceUri :: URI
- sourceDist :: Either String (ReleaseName, [Section])
- type SliceName = ReleaseName
- quoteWords :: String -> [String]
- stripLine :: String -> String
- sourceLines :: String -> [String]
- parseSourceLine :: String -> DebSource
- parseOptions :: String -> Either ParseError [SourceOption]
- pOptions :: CharParser () [SourceOption]
- pOption :: CharParser () SourceOption
- pOp :: CharParser () SourceOp
- parseSourceLine' :: String -> Either String DebSource
- parseSourcesList :: String -> [DebSource]
- testQuoteWords :: Test
- testSourcesList :: Test
- testSourcesList2 :: Test
- validSourcesListStr :: String
- validSourcesList :: [DebSource]
- validSourcesListExpected :: String
- _invalidSourcesListStr1 :: Text
- testSourcesListParse :: Test
- sourcesListTests :: Test
Documentation
data SourceType Source #
Instances
Eq SourceType Source # | |
Defined in Debian.Sources | |
Ord SourceType Source # | |
Defined in Debian.Sources Methods compare :: SourceType -> SourceType -> Ordering # (<) :: SourceType -> SourceType -> Bool # (<=) :: SourceType -> SourceType -> Bool # (>) :: SourceType -> SourceType -> Bool # (>=) :: SourceType -> SourceType -> Bool # max :: SourceType -> SourceType -> SourceType # min :: SourceType -> SourceType -> SourceType # | |
Show SourceType Source # | |
Defined in Debian.Sources Methods showsPrec :: Int -> SourceType -> ShowS # show :: SourceType -> String # showList :: [SourceType] -> ShowS # | |
Pretty SourceType Source # | |
Defined in Debian.Sources Methods pPrintPrec :: PrettyLevel -> Rational -> SourceType -> Doc # pPrint :: SourceType -> Doc # pPrintList :: PrettyLevel -> [SourceType] -> Doc # |
data SourceOption Source #
Constructors
SourceOption String SourceOp [String] |
Instances
Eq SourceOption Source # | |
Defined in Debian.Sources | |
Ord SourceOption Source # | |
Defined in Debian.Sources Methods compare :: SourceOption -> SourceOption -> Ordering # (<) :: SourceOption -> SourceOption -> Bool # (<=) :: SourceOption -> SourceOption -> Bool # (>) :: SourceOption -> SourceOption -> Bool # (>=) :: SourceOption -> SourceOption -> Bool # max :: SourceOption -> SourceOption -> SourceOption # min :: SourceOption -> SourceOption -> SourceOption # | |
Show SourceOption Source # | |
Defined in Debian.Sources Methods showsPrec :: Int -> SourceOption -> ShowS # show :: SourceOption -> String # showList :: [SourceOption] -> ShowS # | |
Pretty SourceOption Source # | |
Defined in Debian.Sources Methods pPrintPrec :: PrettyLevel -> Rational -> SourceOption -> Doc # pPrint :: SourceOption -> Doc # pPrintList :: PrettyLevel -> [SourceOption] -> Doc # |
Instances
Eq SourceOp Source # | |
Ord SourceOp Source # | |
Defined in Debian.Sources | |
Show SourceOp Source # | |
Pretty SourceOp Source # | |
Defined in Debian.Sources Methods pPrintPrec :: PrettyLevel -> Rational -> SourceOp -> Doc # pPrintList :: PrettyLevel -> [SourceOp] -> Doc # |
Constructors
DebSource | |
Fields
|
Instances
Eq DebSource Source # | |
Ord DebSource Source # | |
Show DebSource Source # | |
Pretty DebSource Source # | |
Defined in Debian.Sources Methods pPrintPrec :: PrettyLevel -> Rational -> DebSource -> Doc # pPrintList :: PrettyLevel -> [DebSource] -> Doc # | |
Pretty (PP [DebSource]) Source # | |
Defined in Debian.Sources Methods pPrintPrec :: PrettyLevel -> Rational -> PP [DebSource] -> Doc # pPrint :: PP [DebSource] -> Doc # pPrintList :: PrettyLevel -> [PP [DebSource]] -> Doc # |
type SliceName = ReleaseName Source #
This is a name given to a combination of parts of one or more releases that can be specified by a sources.list file.
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.
sourceLines :: String -> [String] Source #
parseSourceLine :: 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 #
parseSourcesList :: String -> [DebSource] Source #
Unit Tests
validSourcesList :: [DebSource] Source #