list-t-attoparsec-0.3.1.1: An "attoparsec" adapter for "list-t"
ListT.Attoparsec
Synopsis
data Error Source
A text message and a list of contexts, as per the failure in "attoparsec".
Constructors
Instances
textParser :: Monad m => Parser a -> ListT m Text -> ListT (EitherT Error m) a Source
Given a text parser, produces a transformation of a stream of text chunks into a stream of parsed results. In case of a parsing failure it raises an Error in the EitherT monad over the base.
Error
EitherT
consumeOne :: Monad m => Parser a -> ListT m Text -> m (Either Error (a, ListT m Text)) Source
Consume only as much input as needed to run the provided parser once. Results in either a failure or the parsed result and the leftover stream.