[Haskell-cafe] catching IO errors in a monad transformer stack

Eric Rasmussen ericrasmussen at gmail.com
Sun Jul 21 22:13:06 CEST 2013


Arie,

Thanks for calling that out. The most useful part for my case is the
MonadCatchIO implementation of catch:

catch :: Exception e => m a -> (e -> m a) -> m a

Hoogle shows a few similar functions for that type signature, but they
won't work for the case of catching an IOException in an arbitrary monad.
Do you happen to know of another approach for catching IOExceptions and
throwing them in ErrorT?

Thanks,
Eric






On Sun, Jul 21, 2013 at 7:00 AM, Arie Peterson <ariep at xs4all.nl> wrote:

> On Thursday 18 July 2013 23:05:33 Eric Rasmussen wrote:
> > […]
> > Would there be any interest in cleaning that up and adding it (or
> something
> > similar) to Control.Monad.CatchIO?
> > […]
>
> MonadCatchIO-transformers is being deprecated, as recently GHC has removed
> the
> 'block' and 'unblock' functions, rendering the api provided by
> Control.Monad.CatchIO obsolete.
>
>
> Regards,
>
> Arie
>
>
> _______________________________________________
> 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/20130721/1ca5e7c3/attachment.htm>


More information about the Haskell-Cafe mailing list