
On 17 February 2011 07:28, Sebastian Fischer
I must admit I still don't understand your exact problem. Could you help me with an example where using mtl2 requires an additional (Functor m) constraint that is not required when using mtl1?
I think the problem is that the mtl1 Functor instances looked like: instance Monad m => Functor (ReaderT e m) where fmap = ... But the mtl2/transformers instances look like: instance Functor f => Functor (ReaderT e f) where fmap = ... This is overall an improvement, but it does mean that if you relied on getting "fmap" for e.g. a (ReaderT e m) monad from a (Monad m) constraint with mtl1 then your code is now broken. You need to add (Functor m) to your context for mtl2. Naturally, this would not be a problem if Functor were a Monad superclass.. Cheers, Max