[Haskell-cafe] Re: ANNOUNCE: enumerator,
an alternative iteratee package
Michael Snoyman
michael at snoyman.com
Tue Aug 24 14:16:39 EDT 2010
On Tue, Aug 24, 2010 at 7:16 PM, Gregory Collins <greg at gregorycollins.net>wrote:
> John Lato <jwlato at gmail.com> writes:
>
> > Oleg included the error state to enable short-circuiting of
> > computation, and I guess everyone just left it in. Recently I've been
> > wondering if it should be removed, though, in favor requiring explicit
> > (i.e. explicit in the type sig) exceptions for everything. I'm not
> > sure if that would be more or less complicated.
>
> If you don't want to go all the way to checked exceptions, MonadCatchIO
> could also be a nice way to go here.
>
> Be *very* careful of combining MonadCatchIO and CPS: the MonadCatchIO
instance for ContT does not perform correctly, and can call the exception
handler twice. It might produce other erroneous behavior, but that was a bug
that plagued me in persistent.
I would recommend looking at the failure package[1] for making the
exceptions explicit in the type signature.
Michael
[1] http://hackage.haskell.org/package/failure
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20100824/f52131e8/attachment.html
More information about the Haskell-Cafe
mailing list