proposal #4095: add Applicative instance for Either

Edward Kmett ekmett at gmail.com
Tue May 25 09:29:19 EDT 2010


+1

On Tue, May 25, 2010 at 8:41 AM, Ross Paterson <ross at soi.city.ac.uk> wrote:

> The proposal is to add this instance to Control.Applicative:
>
>    instance Applicative (Either e) where
>        pure          = Right
>        Left  e <*> _ = Left e
>        Right f <*> r = fmap f r
>
> This is not the only possible instance for Either, but this one is
> compatible with the usual Monad instance.
>
> Deadline: 15th June 2010
> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://www.haskell.org/mailman/listinfo/libraries
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/libraries/attachments/20100525/f3b54fd9/attachment.html


More information about the Libraries mailing list