
29 May
2008
29 May
'08
2:53 p.m.
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.)
-Isaac
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). Cheers, Spencer Janssen