[Haskell-cafe] Parsec monad transformer with IO?
greg at gregorycollins.net
Thu Mar 18 12:43:35 EDT 2010
Stefan Klinger <all-lists at stefan-klinger.de> writes:
> Nice, Parsec 3 comes with a monad transformer . 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
Gregory Collins <greg at gregorycollins.net>
More information about the Haskell-Cafe