[Haskell-cafe] Re: ANNOUNCE: enumerator, an alternative iteratee package

John Millikin jmillikin at gmail.com
Tue Aug 24 14:37:03 EDT 2010


On Tue, Aug 24, 2010 at 05:12, John Lato <jwlato at gmail.com> wrote:
> 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.

The first few iterations of the "enumerator" package use explicit
error types, but this makes it very difficult to combine
enumerator-based libraries. The only way I could get everything to
work correctly was to always set the error type to SomeException,
which is equivalent to and more verbose than making SomeException the
only supported type.

I believe relying on the MonadError class would have the same
drawback, since (as far as I know) it's not possible to create
MonadError instances which can accept multiple error types.


More information about the Haskell-Cafe mailing list