Cabal-2.1.0.0: A framework for packaging Haskell software

Safe HaskellNone
LanguageHaskell2010

Distribution.Parsec.Class

Contents

Synopsis

Documentation

class Parsec a where Source #

TODO: implementation details: should be careful about consuming trailing whitespace? Should we always consume it?

Minimal complete definition

parsec

Methods

parsec :: ParsecParser a Source #

lexemeParsec :: ParsecParser a Source #

parsec could consume trailing spaces, this function must consume.

Instances
Parsec Bool # 
Instance details
Parsec BuildType # 
Instance details
Parsec ExecutableScope # 
Instance details
Parsec ForeignLibOption # 
Instance details
Parsec ForeignLibType # 
Instance details
Parsec Version # 
Instance details
Parsec VersionRange # 
Instance details
Parsec PkgconfigName # 
Instance details
Parsec ComponentId # 
Instance details
Parsec ModuleName # 
Instance details
Parsec ModuleRenaming # 
Instance details
Parsec IncludeRenaming # 
Instance details
Parsec RepoType # 
Instance details
Parsec RepoKind # 
Instance details
Parsec Platform # 
Instance details
Parsec Arch # 
Instance details
Parsec OS # 
Instance details
Parsec TestType # 
Instance details
Parsec PkgconfigDependency # 
Instance details
Parsec BenchmarkType # 
Instance details
Parsec License # 
Instance details
Parsec Extension # 
Instance details
Parsec Language # 
Instance details
Parsec CompilerFlavor # 
Instance details
Parsec FilePathNT # 
Instance details
Parsec FreeText # 
Instance details
Parsec TestedWith # 
Instance details
Parsec SpecVersion # 
Instance details
Parsec Token' # 
Instance details
Parsec Token # 
Instance details
Parsec PackageName # 
Instance details
Parsec UnqualComponentName # 
Instance details
Parsec DefUnitId # 
Instance details
Parsec UnitId #

The textual format for UnitId coincides with the format GHC accepts for -package-id.

Instance details
Parsec Module # 
Instance details
Parsec ModuleReexport # 
Instance details
Parsec Mixin # 
Instance details
Parsec ExeDependency # 
Instance details
Parsec Dependency # 
Instance details
Parsec LegacyExeDependency # 
Instance details
Parsec LibVersionInfo # 
Instance details
Parsec FlagName # 
Instance details
Parsec TestShowDetails # 
Instance details
Parsec a => Parsec (Identity a) # 
Instance details
Parsec a => Parsec (MQuoted a) # 
Instance details
(Newtype b a, Sep sep, Parsec b) => Parsec (List sep b a) # 
Instance details

type ParsecParser a = forall s. Stream s Identity Char => Parsec s [PWarning] a Source #

Warnings

data PWarnType Source #

Type of parser warning. We do classify warnings.

Different application may decide not to show some, or have fatal behaviour on others

Constructors

PWTOther

Unclassified warning

PWTUTF

Invalid UTF encoding

PWTBoolCase

true or false, not True or False

PWTVersionTag

there are version with tags

PWTNewSyntax

New syntax used, but no cabal-version: >= 1.2 specified

PWTOldSyntax

Old syntax used, and cabal-version >= 1.2 specified

PWTDeprecatedField 
PWTInvalidSubsection 
PWTUnknownField 
PWTUnknownSection 
PWTTrailingFields 
PWTExtraMainIs

extra main-is field

PWTExtraTestModule

extra test-module field

PWTExtraBenchmarkModule

extra benchmark-module field

PWTLexNBSP 
PWTLexBOM 
PWTQuirkyCabalFile

legacy cabal file that we know how to patch

Utilities

parsecQuoted :: Stream s Identity Char => Parsec s [PWarning] a -> Parsec s [PWarning] a Source #

Content isn't unquoted

parsecMaybeQuoted :: Stream s Identity Char => Parsec s [PWarning] a -> Parsec s [PWarning] a Source #

parsecMaybeQuoted p = parsecQuoted p | p.

parsecStandard :: (Parsec ver, Stream s Identity Char) => (ver -> String -> a) -> Parsec s [PWarning] a Source #

Parse a benchmark/test-suite types.