| Copyright | Isaac Jones 2003-2005 |
|---|---|
| License | BSD3 |
| Maintainer | cabal-devel@haskell.org |
| Portability | portable |
| Safe Haskell | None |
| Language | Haskell2010 |
Distribution.Simple.PackageDescription
Description
This defines parsers for the .cabal format
Synopsis
- readGenericPackageDescription :: Verbosity -> Maybe (SymbolicPath CWD ('Dir Pkg)) -> SymbolicPath Pkg 'File -> IO GenericPackageDescription
- readHookedBuildInfo :: Verbosity -> Maybe (SymbolicPath CWD ('Dir Pkg)) -> SymbolicPath Pkg 'File -> IO HookedBuildInfo
- parseString :: (ByteString -> ParseResult CabalFileSource a) -> Verbosity -> String -> ByteString -> IO a
- readAndParseFile :: (ByteString -> ParseResult CabalFileSource a) -> Verbosity -> Maybe (SymbolicPath CWD ('Dir Pkg)) -> SymbolicPath Pkg 'File -> IO a
- flattenDups :: Verbosity -> [PWarningWithSource src] -> [PWarningWithSource src]
Read and Parse files
readGenericPackageDescription :: Verbosity -> Maybe (SymbolicPath CWD ('Dir Pkg)) -> SymbolicPath Pkg 'File -> IO GenericPackageDescription Source #
Arguments
| :: Verbosity | |
| -> Maybe (SymbolicPath CWD ('Dir Pkg)) | working directory |
| -> SymbolicPath Pkg 'File | |
| -> IO HookedBuildInfo |
Utility Parsing function
Arguments
| :: (ByteString -> ParseResult CabalFileSource a) | File contents to final value parser |
| -> Verbosity | Verbosity level |
| -> String | File name |
| -> ByteString | |
| -> IO a |
Arguments
| :: (ByteString -> ParseResult CabalFileSource a) | File contents to final value parser |
| -> Verbosity | Verbosity level |
| -> Maybe (SymbolicPath CWD ('Dir Pkg)) | Working directory |
| -> SymbolicPath Pkg 'File | File to read |
| -> IO a |
Helper combinator to do parsing plumbing for files.
Given a parser and a filename, return the parse of the file, after checking if the file exists.
Argument order is chosen to encourage partial application.
flattenDups :: Verbosity -> [PWarningWithSource src] -> [PWarningWithSource src] Source #
Collapse duplicate experimental feature warnings into single warning, with a count of further sites