Proposal #2316: Add Applicative instances for all MTL Monads

Spencer Janssen sjanssen at cse.unl.edu
Thu May 29 14:58:20 EDT 2008


On Thu, May 29, 2008 at 03:58:07PM +0100, Ross Paterson wrote:
> On Thu, May 29, 2008 at 06:44:12AM -0400, Isaac Dupree wrote:
> > Spencer Janssen wrote:
> >> This proposal is very straightforward: add Applicative instances for all the
> >> Monads in the MTL.
> >
> > It's not quite as straightforward as it looks:
> > If you only need an
> > instance (Applicative m) => Applicative (Transformer m),
> > not
> > instance (Monad m) => Applicative (Transformer m),
> > will you use the first one?  (I think yes.)
> 
> Yes, and ditto for the Functor instances, where possible.

Is it worth sacrificing backwards compatibility?  We can't guarantee that all
Monads are Functors.

> Also, Alternative instances for everything that has a MonadPlus instance.

I will add these.


Cheers,
Spencer Janssen


More information about the Libraries mailing list