broken Monad Either instance?

Paterson, Ross R.Paterson at city.ac.uk
Tue Nov 29 12:55:33 CET 2011


Christian Maeder writes:
>Am 28.11.2011 15:30, schrieb Ben Millwood:
>> It's not exactly a bug, it's a change in behaviour. Beforehand, there
>> was no overlapping instance, the instance was just
>> 'instance (Error e) =>  Monad (Either e) where' but the Error
>> constraint proved to be more a hindrance than a help, since it
>> prevented the instance being used with Left things that weren't
>> Errors, even though that's often a useful thing to do. So it was
>> agreed that the Error constraint should be removed, breaking 'fail'
>> but making the instance much more generally applicable.
>
> Was there a library proposal that I've missed? Does any release note
> mention this change?

The library proposal was
http://thread.gmane.org/gmane.comp.lang.haskell.libraries/13196

The mtl package hasn't been released with GHC since 6.10, so the GHC
7.0.1 release notes don't mention changes to it, just that instances
were added to base.


More information about the Libraries mailing list