| License | GPL-3.0-or-later AND BSD-3-Clause |
|---|---|
| Safe Haskell | None |
| Language | Haskell2010 |
Cabal.Parse
Description
.cabal and a like file parsing helpers.
Synopsis
- parseWith :: ([Field Position] -> ParseResult a) -> FilePath -> ByteString -> Either ParseError a
- data ParseError = ParseError {
- peFilename :: FilePath
- peContents :: ByteString
- peErrors :: [PError]
- peWarnings :: [PWarning]
- renderParseError :: ParseError -> String
Documentation
Arguments
| :: ([Field Position] -> ParseResult a) | parse |
| -> FilePath | filename |
| -> ByteString | contents |
| -> Either ParseError a |
Parse the contents using provided parser from Field list.
This variant doesn't return any warnings in the successful case.
data ParseError Source #
Parse error.
Constructors
| ParseError | |
Fields
| |
Instances
| Show ParseError Source # | |
Defined in Cabal.Parse Methods showsPrec :: Int -> ParseError -> ShowS # show :: ParseError -> String # showList :: [ParseError] -> ShowS # | |
| Exception ParseError Source # | |
Defined in Cabal.Parse Methods toException :: ParseError -> SomeException # fromException :: SomeException -> Maybe ParseError # displayException :: ParseError -> String # | |
renderParseError :: ParseError -> String Source #
Render parse error highlighting the part of the input file.