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

Edward Kmett ekmett at gmail.com
Wed Jun 30 19:20:49 EDT 2010

On Wed, Jun 30, 2010 at 6:29 PM, Claus Reinke <claus.reinke at talk21.com>wrote:

> Note that my opposition is against making 'Monad (Either a)' less
>>> defined and less tunable than it is at the moment.
>> It's a common trade-off: the Error constraint limits the instances that
>> are available, but gives you a bit more when you have an instance.  One
>> must weigh the relative value of fail vs the unconstrained instance.
> If there is no full definition of 'Monad (Either a)' for all 'a', then
> qualifying 'a' by an additional type class seems to be the standard
> Haskell solution. 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

Actually, I rather like this option. =)

-Edward Kmett
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/libraries/attachments/20100630/121a74ce/attachment.html

More information about the Libraries mailing list