| |||||||||||||
| |||||||||||||
Description | |||||||||||||
Utilities for parsing PackageDescription and InstalledPackageInfo. | |||||||||||||
Synopsis | |||||||||||||
Documentation | |||||||||||||
type LineNo = Int | |||||||||||||
data PError | |||||||||||||
| |||||||||||||
type PWarning = String | |||||||||||||
locatedErrorMsg :: PError -> (Maybe LineNo, String) | |||||||||||||
syntaxError :: LineNo -> String -> ParseResult a | |||||||||||||
warning :: String -> ParseResult () | |||||||||||||
runP :: LineNo -> String -> ReadP a a -> String -> ParseResult a | |||||||||||||
data ParseResult a | |||||||||||||
| |||||||||||||
catchParseError :: ParseResult a -> (PError -> ParseResult a) -> ParseResult a | |||||||||||||
parseFail :: PError -> ParseResult a | |||||||||||||
data Field | |||||||||||||
| |||||||||||||
fName :: Field -> String | |||||||||||||
lineNo :: Field -> LineNo | |||||||||||||
data FieldDescr a | |||||||||||||
| |||||||||||||
readFields :: String -> ParseResult [Field] | |||||||||||||
parseFilePathQ :: ReadP r FilePath | |||||||||||||
parseTokenQ :: ReadP r String | |||||||||||||
parseModuleNameQ :: ReadP r String | |||||||||||||
parse a module name | |||||||||||||
parseDependency :: ReadP r Dependency | |||||||||||||
parsePkgconfigDependency :: ReadP r Dependency | |||||||||||||
parseOptVersion :: ReadP r Version | |||||||||||||
parsePackageNameQ :: ReadP r String | |||||||||||||
parseVersionRangeQ :: ReadP r VersionRange | |||||||||||||
parseTestedWithQ :: ReadP r (CompilerFlavor, VersionRange) | |||||||||||||
parseLicenseQ :: ReadP r License | |||||||||||||
parseExtensionQ :: ReadP r Extension | |||||||||||||
parseSepList | |||||||||||||
| |||||||||||||
parseCommaList | |||||||||||||
| |||||||||||||
parseOptCommaList | |||||||||||||
| |||||||||||||
showFilePath :: FilePath -> Doc | |||||||||||||
showToken :: String -> Doc | |||||||||||||
showTestedWith :: (CompilerFlavor, VersionRange) -> Doc | |||||||||||||
showDependency :: Dependency -> Doc | |||||||||||||
showFreeText :: String -> Doc | |||||||||||||
Pretty-print free-format text, ensuring that it is vertically aligned, and with blank lines replaced by dots for correct re-parsing. | |||||||||||||
field :: String -> (a -> Doc) -> ReadP a a -> FieldDescr a | |||||||||||||
simpleField :: String -> (a -> Doc) -> ReadP a a -> (b -> a) -> (a -> b -> b) -> FieldDescr b | |||||||||||||
listField :: String -> (a -> Doc) -> ReadP [a] a -> (b -> [a]) -> ([a] -> b -> b) -> FieldDescr b | |||||||||||||
commaListField :: String -> (a -> Doc) -> ReadP [a] a -> (b -> [a]) -> ([a] -> b -> b) -> FieldDescr b | |||||||||||||
optsField :: String -> CompilerFlavor -> (b -> [(CompilerFlavor, [String])]) -> ([(CompilerFlavor, [String])] -> b -> b) -> FieldDescr b | |||||||||||||
liftField :: (b -> a) -> (a -> b -> b) -> FieldDescr a -> FieldDescr b | |||||||||||||
parseReadS :: Read a => ReadP r a | |||||||||||||
parseReadSQ :: Read a => ReadP r a | |||||||||||||
Parse something optionally wrapped in quotes. | |||||||||||||
parseQuoted :: ReadP r a -> ReadP r a | |||||||||||||
Produced by Haddock version 2.2.2 |