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 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05
ModuleCabal-syntax-3.12.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 ParseResultDefined in Cabal-syntax-3.12.1.0 · Distribution.Fields.ParseResultFunctor ParseResultDefined in Cabal-syntax-3.12.1.0 · Distribution.Fields.ParseResultApplicative ParseResultDefined in Cabal-syntax-3.12.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.
Quickly 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-pec-version *WS
spec-version = NUM "." NUM [ "." NUM ]
NUM = DIGIT0 / DIGITP 1*DIGIT0
DIGIT0 = %x30-39
DIGITP = %x31-39
WS = %20