attoparsec-trans-0.1.1.0: Interleaved effects for attoparsec parsers

Safe HaskellNone
LanguageHaskell2010

Control.Monad.Trans.Parser

Contents

Synopsis

Parser types

data ResultM i m r Source

Constructors

FailM i String 
DoneM i r 
PartialM (ParserT i m r) 

Instances

Monad m => Functor (ResultM i m) 

toM :: Monad m => IResult i r -> ResultM i m r Source

newtype ParserT i m r Source

Constructors

ParserT 

Fields

runParserT :: i -> m (ResultM i m r)
 

Instances

MonadTrans (ParserT i) 
Monad m => Monad (ParserT i m) 
Monad m => Functor (ParserT i m) 
Monad m => Applicative (ParserT i m) 
MonadIO m => MonadIO (ParserT i m) 

liftIR :: (Monad m, Monoid i) => IResult i r -> ParserT i m r Source

liftP :: Monad m => (i -> IResult i r) -> ParserT i m r Source

Running parsers

feedM :: (Monad m, Monoid i) => ResultM i m r -> i -> m (ResultM i m r) Source

feedMWith :: (Monad m, Monoid i, Eq i) => m i -> ResultM i m r -> m (ResultM i m r) Source

runParserTOnly :: Monad m => ParserT i m r -> i -> m (Either String r) Source

runParserTWith :: (Monad m, Monoid i, Eq i) => m i -> ParserT i m r -> ParserT i m r Source

Merging transformers

runStateParserT :: Monad m => ParserT i (StateT r m) () -> r -> ParserT i m r Source

runWriterParserT :: (Monad m, Monoid r) => ParserT i (WriterT r m) () -> ParserT i m r Source

Result conversion

failResultM :: Monad m => ResultM i m r -> m r Source

zeroResultM :: MonadPlus m => ResultM i m r -> m r Source