Very interesting, thanks.
On 1 April 2011 21:59, Dmitry Olshansky <olshanskydr@gmail.com> wrote:No because it uses the control operation Control.Exception.finally ::
> Is it possible to change enumFile to using MonadIO class?
IO a -> IO b -> IO a internally. You can't lift control operations
with liftIO :: MonadIO m => IO a -> m a.
However if you are able to define a MonadTransControl and
MonadControlIO instance (from the monad-control package[1]) for
Iteratee and use Control.Exception.Control.finally instead of the
regular finally, you can use your MyMonad with the modified enumFile.
Good luck,
Bas
[1] http://hackage.haskell.org/package/monad-control