---------- Forwarded message ---------- From: Dmitry Olshansky <[email protected]> Date: 2011/4/2 Subject: Re: [Haskell-cafe] using IO monad in Iteratee To: wren ng thornton <[email protected]>
Well, in my case I can use probably withBinaryFile fn (\h-> run $ enumHandle h ...) 2011/4/2 wren ng thornton <[email protected]> > On 4/1/11 3:59 PM, Dmitry Olshansky wrote: > >> But enumFile use IO monad instead of MonadIO class. >> [...] >> >> Is it possible to change enumFile to using MonadIO class? >> > > Unless its changed significantly since I looked at it last (which it may > well have), it's not possible. The problem is that what we'd really need is > lowerIO :: m a -> IO a for the m in question; liftIO goes the wrong way. Of > course, getting a lowerIO with the right semantics will be tricky for most > monads. > > -- > Live well, > ~wren > > _______________________________________________ > Haskell-Cafe mailing list > [email protected] > http://www.haskell.org/mailman/listinfo/haskell-cafe >
_______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
