Safe Haskell | Safe |
---|---|
Language | Haskell98 |
- 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 #
data SourceOption Source #
DebSource | |
|
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 #