On Tue, May 25, 2010 at 6:34 PM, Ross Paterson <ross@soi.city.ac.uk> wrote:
On Tue, May 25, 2010 at 04:55:09PM -0400, Edward Kmett wrote:What definition of empty/mzero do you have in mind?
> In my perfect world the next version of transformers would provide an entry in
> Control.Monad.Instances for:
>
> instance Applicative (Either m)
> instance Alternative (Either m)
> instance Monad (Either m)
> instance MonadPlus (Either m)
> But there are quite possibly too many moving parts to make such a bigI can't think of a Monad instance that uses the Monoid constraint.
> jump, and then you have the other bikeshedding issue of there being
> yet another definition for Either that makes sense to default to:
>
> instance Monoid m => Applicative (Either m)
> instance Monoid m => Alternative (Either m)
> instance Monoid m => Monad (Either m)
> instance Monoid m => MonadPlus (Either m)
What is the instance you mean?