License | GPL-3.0-or-later AND BSD-3-Clause |
---|---|
Safe Haskell | None |
Language | Haskell2010 |
.cabal
and a like file parsing helpers.
Synopsis
- parseWith :: ([Field Position] -> ParseResult a) -> FilePath -> ByteString -> Either (ParseError NonEmpty) a
- data ParseError f = ParseError {
- peFilename :: FilePath
- peContents :: ByteString
- peErrors :: f PError
- peWarnings :: [PWarning]
- renderParseError :: Foldable f => ParseError f -> String
Documentation
:: ([Field Position] -> ParseResult a) | parse |
-> FilePath | filename |
-> ByteString | contents |
-> Either (ParseError NonEmpty) a |
Parse the contents using provided parser from Field
list.
This variant doesn't return any warnings in the successful case.
data ParseError f Source #
Parse error.
ParseError | |
|
Instances
renderParseError :: Foldable f => ParseError f -> String Source #
Render parse error highlighting the part of the input file.