#4159: move Monad and MonadFix instances for Either from mtl to
lemming at henning-thielemann.de
Tue Jun 29 15:50:26 EDT 2010
On Tue, 29 Jun 2010, Claus Reinke wrote:
> "Ross Paterson" <ross at soi.city.ac.uk> schrieb im Newsbeitrag
> news:20100629092649.GA3460 at soi.city.ac.uk...
>> The proposal is to move the Monad and MonadFix instances for Either
>> (currently in the mtl package) to Control.Monad.Instances and
>> Control.Monad.Fix respectively (both in the base package). The Monad
>> instance is still an orphan, to retain Haskell 98 compatibility, but the
>> MonadFix instance is together with its class. The Error constraint is
>> removed from both instances, and the default definition of fail is used.
>> Discussion deadline: 20th July 2010
> -1, because the default definition of fail is error, which would
> render the Monad instance useless (unless I'm missing something?).
You would just use Left instead of 'fail' if you want to show failure in
an Either value.
More information about the Libraries