Parses the given file into a GenericPackageDescription.
In Cabal 1.2 the syntax for package descriptions was changed to a format with sections and possibly indented property descriptions.
:: a typeCtrl KGHC 10.0.0.20260917 · lts/ghc-10.0.x · 8174fa4 · 2026-10-11
ModuleCabal-syntax-3.18.1.0Haskell2010
This defined parsers and partial pretty printers for the .cabal format.
Parses the given file into a GenericPackageDescription.
In Cabal 1.2 the syntax for package descriptions was changed to a format with sections and possibly indented property descriptions.
Maybe variant of parseGenericPackageDescription
A monad with failure and accumulating errors and warnings.
Monad (ParseResult src)Defined in Cabal-syntax-3.18.1.0 · Distribution.Fields.ParseResultFunctor (ParseResult src)Defined in Cabal-syntax-3.18.1.0 · Distribution.Fields.ParseResultApplicative (ParseResult src)Defined in Cabal-syntax-3.18.1.0 · Distribution.Fields.ParseResultDestruct a ParseResult into the emitted warnings and either a successful value or list of errors and possibly recovered a spec-version declaration.
The source of a parse error
Functor PSourceDefined in Cabal-syntax-3.18.1.0 · Distribution.Parsec.SourceEq src => Eq (PSource src)Defined in Cabal-syntax-3.18.1.0 · Distribution.Parsec.SourceOrd src => Ord (PSource src)Defined in Cabal-syntax-3.18.1.0 · Distribution.Parsec.SourceShow src => Show (PSource src)Defined in Cabal-syntax-3.18.1.0 · Distribution.Parsec.SourceGeneric (PSource src)Defined in Cabal-syntax-3.18.1.0 · Distribution.Parsec.SourceNFData src => NFData (PSource src)Defined in Cabal-syntax-3.18.1.0 · Distribution.Parsec.SourceBinary src => Binary (PSource src)Defined in Cabal-syntax-3.18.1.0 · Distribution.Parsec.Sourcetype Rep (PSource src) = D1 ('MetaData "PSource"
"Distribution.Parsec.Source"
"Cabal-syntax-3.18.1.0-a008"
'False) (C1 ('MetaCons "PKnownSource"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 src)) :+: C1 ('MetaCons "PUnknownSource"
'PrefixI 'False) U1)Defined in Cabal-syntax-3.18.1.0 · Distribution.Parsec.SourceQuickly scan new-style spec-version
A new-style spec-version declaration begins the .cabal file and follow the following case-insensitive grammar (expressed in RFC5234 ABNF):
newstyle-spec-version-decl = "cabal-version" *WS ":" *WS newstyle-spec-version *WS
spec-version = NUM "." NUM [ "." NUM ]
NUM = DIGIT0 / DIGITP 1*DIGIT0
DIGIT0 = %x30-39
DIGITP = %x31-39
WS = %20