#4159: move Monad and MonadFix instances for Either from mtl to base

John Meacham john at repetae.net
Wed Jun 30 19:09:00 EDT 2010

On Wed, Jun 30, 2010 at 11:57:23PM +0100, Ross Paterson wrote:
> On Thu, Jul 01, 2010 at 12:29:57AM +0200, Claus Reinke wrote:
> > As I said, even if you just want to drop 'Error', you could define
> > 'fail s = Left (error s)'. That would still be less defined than the
> > current instance, but more defined than the proposed instance.
> That didn't occur to me -- it seems harmless enough, but it wouldn't be
> enough to support pattern binding with the Either monad, would it?

Please no, there is no reason to associate Left with failure of any sort
in the either instance. Either is the perfectly useful monad of a
computation with a short circuit return, the short circuit return
doesn't necessarily have anything to do with failure, any
attempt to conflate the two would be artificial and limiting.


John Meacham - ⑆repetae.net⑆john⑈ - http://notanumber.net/

More information about the Libraries mailing list