proposal #4095: add Applicative instance for Either

Bas van Dijk v.dijk.bas at gmail.com
Tue May 25 14:01:28 EDT 2010


On Tue, May 25, 2010 at 7:59 PM, Henning Thielemann
<lemming at henning-thielemann.de> wrote:
>
> On Tue, 25 May 2010, Bas van Dijk wrote:
>
>> On Tue, May 25, 2010 at 7:21 PM, Ross Paterson <ross at soi.city.ac.uk>
>> wrote:
>>>
>>> Fine by me.  Making it a non-orphan would break Haskell 98 compatibility,
>>> though.
>>
>> Making it non-orphan means moving the Monad Either instance to either
>> GHC.Base (which defines the Monad class) or to Data.Either (which
>> defines the Either type). How exactly does this break Haskell 98
>> compatibility?
>
> Since there is no Monad Either instance in Haskell 98, Haskell 98 programs
> can safely define their own one. If we would add such an instance to the
> base library this would break those programs.

Oh yes I see. Bummer!

Bas


More information about the Libraries mailing list