[Haskell-cafe] Fwd: using IO monad in Iteratee

Dmitry Olshansky olshanskydr at gmail.com
Sat Apr 2 11:34:53 CEST 2011


---------- Forwarded message ----------
From: Dmitry Olshansky <olshanskydr at gmail.com>
Date: 2011/4/2
Subject: Re: [Haskell-cafe] using IO monad in Iteratee
To: wren ng thornton <wren at freegeek.org>


Well, in my case I can use probably

withBinaryFile fn (\h-> run $ enumHandle h ...)




2011/4/2 wren ng thornton <wren at freegeek.org>

> 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
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20110402/4594105e/attachment.htm>


More information about the Haskell-Cafe mailing list