Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data SourceType
- data SourceOption = SourceOption String SourceOp [String]
- data SourceOp
- data DebSource = DebSource {
- _sourceType :: SourceType
- _sourceOptions :: [SourceOption]
- _sourceUri :: VendorURI
- _sourceDist :: Either String (Codename, [Section])
- quoteWords :: String -> [String]
- stripLine :: String -> String
- sourceLines :: String -> [String]
- parseSourceLine :: [Loc] -> String -> DebSource
- parseOptions :: String -> Either ParseError [SourceOption]
- pOptions :: CharParser () [SourceOption]
- pOption :: CharParser () SourceOption
- pOp :: CharParser () SourceOp
- parseSourceLine' :: [Loc] -> String -> Either String DebSource
- parseSourcesList :: [Loc] -> String -> [DebSource]
- testQuoteWords :: Test
- testSourcesList :: Test
- testSourcesList2 :: Test
- validSourcesListStr :: String
- validSourcesList :: [DebSource]
- validSourcesListExpected :: String
- _invalidSourcesListStr1 :: Text
- testSourcesListParse :: Test
- sourcesListTests :: Test
- sourceUri :: Lens' DebSource VendorURI
- sourceType :: Lens' DebSource SourceType
- sourceOptions :: Lens' DebSource [SourceOption]
- sourceDist :: Lens' DebSource (Either String (Codename, [Section]))
Documentation
data SourceType Source #
Instances
Pretty SourceType Source # | |
Defined in Debian.Sources pretty :: SourceType -> Doc # prettyVersioned :: CabalSpecVersion -> SourceType -> Doc # | |
Show SourceType Source # | |
Defined in Debian.Sources showsPrec :: Int -> SourceType -> ShowS # show :: SourceType -> String # showList :: [SourceType] -> ShowS # | |
Eq SourceType Source # | |
Defined in Debian.Sources (==) :: SourceType -> SourceType -> Bool # (/=) :: SourceType -> SourceType -> Bool # | |
Ord SourceType Source # | |
Defined in Debian.Sources compare :: SourceType -> SourceType -> Ordering # (<) :: SourceType -> SourceType -> Bool # (<=) :: SourceType -> SourceType -> Bool # (>) :: SourceType -> SourceType -> Bool # (>=) :: SourceType -> SourceType -> Bool # max :: SourceType -> SourceType -> SourceType # min :: SourceType -> SourceType -> SourceType # |
data SourceOption Source #
Instances
Pretty SourceOption Source # | |
Defined in Debian.Sources pretty :: SourceOption -> Doc # prettyVersioned :: CabalSpecVersion -> SourceOption -> Doc # | |
Show SourceOption Source # | |
Defined in Debian.Sources showsPrec :: Int -> SourceOption -> ShowS # show :: SourceOption -> String # showList :: [SourceOption] -> ShowS # | |
Eq SourceOption Source # | |
Defined in Debian.Sources (==) :: SourceOption -> SourceOption -> Bool # (/=) :: SourceOption -> SourceOption -> Bool # | |
Ord SourceOption Source # | |
Defined in Debian.Sources compare :: SourceOption -> SourceOption -> Ordering # (<) :: SourceOption -> SourceOption -> Bool # (<=) :: SourceOption -> SourceOption -> Bool # (>) :: SourceOption -> SourceOption -> Bool # (>=) :: SourceOption -> SourceOption -> Bool # max :: SourceOption -> SourceOption -> SourceOption # min :: SourceOption -> SourceOption -> SourceOption # |
DebSource | |
|
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 :: [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 #
Unit Tests
validSourcesList :: [DebSource] Source #