Copyright | 2010 John Millikin |
---|---|
License | MIT |
Maintainer | jmillikin@gmail.com |
Portability | portable |
Safe Haskell | None |
Language | Haskell98 |
Data.Attoparsec.Enumerator
Description
Synopsis
- data ParseError = ParseError {
- errorContexts :: [String]
- errorMessage :: String
- class AttoparsecInput a
- iterParser :: (AttoparsecInput a, Monad m) => Parser a b -> Iteratee a m b
Documentation
data ParseError Source #
The context and message from a Fail
value.
Constructors
ParseError | |
Fields
|
Instances
Show ParseError Source # | |
Defined in Data.Attoparsec.Enumerator | |
Exception ParseError Source # | |
Defined in Data.Attoparsec.Enumerator Methods toException :: ParseError -> SomeException Source # fromException :: SomeException -> Maybe ParseError Source # displayException :: ParseError -> String Source # |
class AttoparsecInput a Source #
A class of types which may be consumed by an Attoparsec parser.
Since: 0.3
Minimal complete definition
parseA, feedA, empty, isNull, notEmpty
Instances
AttoparsecInput ByteString Source # | |
Defined in Data.Attoparsec.Enumerator Methods parseA :: Parser ByteString b -> ByteString -> IResult ByteString b feedA :: IResult ByteString b -> ByteString -> IResult ByteString b empty :: ByteString isNull :: ByteString -> Bool notEmpty :: [ByteString] -> [ByteString] | |
AttoparsecInput Text Source # | |
iterParser :: (AttoparsecInput a, Monad m) => Parser a b -> Iteratee a m b Source #
Convert an Attoparsec Parser
into an Iteratee
. The parser will
be streamed bytes until it returns Done
or Fail
.
If parsing fails, a ParseError
will be thrown with throwError
. Use
catchError
to catch it.