Cabal-2.1.0.0: A framework for packaging Haskell software

CopyrightIsaac Jones 2003-2005
LicenseBSD3
Maintainercabal-devel@haskell.org
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

Distribution.PackageDescription.Parsec

Contents

Description

This defined parsers and partial pretty printers for the .cabal format.

Synopsis

Package descriptions

parseGenericPackageDescription :: ByteString -> ParseResult GenericPackageDescription Source #

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.

Parsing

data ParseResult a Source #

A monad with failure and accumulating errors and warnings.

Instances
Monad ParseResult # 
Instance details
Functor ParseResult # 
Instance details

Methods

fmap :: (a -> b) -> ParseResult a -> ParseResult b Source #

(<$) :: a -> ParseResult b -> ParseResult a Source #

Applicative ParseResult # 
Instance details

runParseResult :: ParseResult a -> ([PWarning], [PError], Maybe a) Source #

Destruct a ParseResult into the emitted warnings and errors, and possibly the final result if there were no errors.

Supplementary build information