Proposal #2316: Add Applicative instances for all MTL Monads

Ross Paterson ross at
Thu May 29 17:05:29 EDT 2008

On Thu, May 29, 2008 at 01:53:26PM -0500, Spencer Janssen wrote:
> Note that each of the Functor instances for the transformers require (Monad m).
> Because Functor is a superclass of Applicative, the Applicative instances must
> also have the (Monad m) constraint.  We can change the Functor instances, but
> it does break backwards compatibility (not all Monads are Functors).

I think it would be best to change the Functor instances, rather than
compounding the problem by repeating it with Applicative and Alternative.
Not all Monads are Functors, but they should be, and all the monads in
base and built using mtl from those will be.

More information about the Libraries mailing list