Modulecabal-install-3.18.1.0Haskell2010
Distribution.Deprecated.ParseUtils
Utilities for parsing PackageDescription and InstalledPackageInfo.
The .cabal file format is not trivial, especially with the introduction
of configurations and the section syntax that goes with that. This module
has a bunch of parsing functions that is used by the .cabal parser and a
couple others. It has the parsing framework code and also little parsers for
many of the formats we get in various .cabal file fields, like module
names, comma separated lists etc.
Synopsis
- type LineNo
- data PError
- data PWarning
- value locatedErrorMsg
- value syntaxError
- value warning
- value runP
- value runE
- data ParseResult
- value parseFail
- value showPWarning
- data Field
- value lineNo
- data FieldDescr
- value readFields
- value parseHaskellString
- value parseTokenQ
- value parseSpaceList
- value parseOptCommaList
- value showFilePath
- value showToken
- value showFreeText
- value field
- value simpleField
- value monoidField
- value listField
- value listFieldWithSep
- value spaceListField
- value newLineListField
- value liftField
- value readPToMaybe
- value fieldParsec
- value simpleFieldParsec
- value monoidFieldParsec
- value listFieldParsec
- value commaListFieldParsec
- value commaNewLineListFieldParsec
- type UnrecFieldParser
- Packagecabal-install-3.18.1.0
- Exports38
- LanguageHaskell2010
- LicenceBSD-3-Clause
- SourceParseUtils.hs
Constructors
ParseFailed PErrorParseOk [PWarning] a
Instances7Monad, Functor, MonadFail, Applicative, Foldable, Traversable, …
Monad ParseResultDefined in cabal-install-3.18.1.0 · Distribution.Deprecated.ParseUtilsFunctor ParseResultDefined in cabal-install-3.18.1.0 · Distribution.Deprecated.ParseUtilsMonadFail ParseResultDefined in cabal-install-3.18.1.0 · Distribution.Deprecated.ParseUtilsApplicative ParseResultDefined in cabal-install-3.18.1.0 · Distribution.Deprecated.ParseUtilsFoldable ParseResultDefined in cabal-install-3.18.1.0 · Distribution.Deprecated.ParseUtilsTraversable ParseResultDefined in cabal-install-3.18.1.0 · Distribution.Deprecated.ParseUtilsShow a => Show (ParseResult a)Defined in cabal-install-3.18.1.0 · Distribution.Deprecated.ParseUtils
Field descriptor. The parameter a parameterizes over where the field's
value is stored in.
Pretty-print free-format text, ensuring that it is vertically aligned, and with blank lines replaced by dots for correct re-parsing.
The type of a function which, given a name-value pair of an unrecognized field, and the current structure being built, decides whether to incorporate the unrecognized field (by returning Just x, where x is a possibly modified version of the structure being built), or not (by returning Nothing).