18 Mar
2010
18 Mar
'10
4:43 p.m.
Stefan Klinger <all-lists@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 <greg@gregorycollins.net>