proposal #4095: add Applicative instance for Either

Iavor Diatchki iavor.diatchki at
Mon May 31 13:18:11 EDT 2010

Are there any uses of this instance that are not related to error
handing?  If not, I would propose that we avoid prolonging the
confusing use of "Either" for error handling and define a separate
type with properly labelled constructors, to be used as "Maybe" but
with multiple reasons for failure.

On Wed, May 26, 2010 at 4:44 AM, Ross Paterson <ross at> wrote:
> Ashley Yakeley <ashley at> writes:
>> I currently have my own implementations for these:
>>      instance Foldable Identity
>>      instance Traversable Identity
>>      instance Applicative Identity
> The transformers package has such instances (but currently for a different
> Identity type).
>>      instance Foldable (Either p)
>>      instance Traversable (Either p)
>>      instance Applicative (Either p)
>>      instance Foldable ((,) p)
>>      instance Traversable ((,) p)
> The Applicative one is proposed here.  The others should also be added.
> _______________________________________________
> Libraries mailing list
> Libraries at

More information about the Libraries mailing list