[Haskell-cafe] Error handling package

Henning Thielemann lemming at henning-thielemann.de
Sun Oct 18 17:38:39 EDT 2009


On Sun, 18 Oct 2009, Michael Snoyman wrote:

> While working on the next release of data-object, I wanted to represent some operations
> that might fail. The typical candidates were:
> 
> 1) Maybe
> 2) Either
> 3) Monad
> 
> Monad is always iffy because of the often times poorly defined fail. Maybe doesn't
> provide any means of reporting what the problem was. Either is not defined as a Monad in
> the base library. Also, the usual candidate of Either String only provides for an error
> message. It would be nice to have more in-depth information available.
> 
> So I've put together a package I call "attempt". It defines a data type called
> (surprise) Attempt with a Success and Failure constructor.

Does the explicit-exception package provide what you need?

http://hackage.haskell.org/package/explicit-exception


More information about the Haskell-Cafe mailing list