G'day all.

Quoting Cale Gibbard <[EMAIL PROTECTED]>:

> One thing which I found odd about the NotJustMaybe pattern is that not
> much is really gained apart from a small amount of convenience.

That's not the whole truth.  It buys you abstraction, in that the library
function can signal an error without caring what specific mechanism is
used to support it.

> Further, if the inconvenience of doing that embedding is
> still too great, we have the typeclass MonadError to differentiate
> between monads with and without failure mechanisms -- perhaps it could
> be cleaned up a bit in a few ways, but I think the idea is right.

That's also possible.  MonadError is designed so that errors can be
caught.  Maybe this is not the most important feature.

Cheers,
Andrew Bromage
_______________________________________________
Haskell mailing list
Haskell@haskell.org
http://www.haskell.org/mailman/listinfo/haskell

Reply via email to