Stefan Klinger <all-li...@stefan-klinger.de> writes:

> Hello!
>
> Nice, Parsec 3 comes with a monad transformer [1]. So I thought I could
> use IO as inner monad, and perform IO operations during parsing.
>
> But I failed. Monad transformers still bend my mind. My problem: I
> don't see a function to actually lift the IO operation into the
> ParsecT. It should be something like
>
>   lift :: IO a -> ParsecT s u IO a

ParsecT has a MonadIO instance:

    class Monad m => MonadIO m where
        liftIO :: IO a -> m a

G
-- 
Gregory Collins <g...@gregorycollins.net>
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to