transformers versus mtl

Ross Paterson ross at soi.city.ac.uk
Fri Mar 20 12:47:09 EDT 2009


On Thu, Mar 19, 2009 at 05:14:22PM -0000, Sittampalam, Ganesh wrote:
> Would now be a good time to start it, or do we need more experience
> of transformers?

Perhaps sooner would be better that later, as there are so many packages
involved (~350, of which over 100 include mtl types and classes in their
interfaces).

I think it's necessary to split off the multi-parameter type classes
from the rest, so that the transformers can be used either on their
own or with type families, and clients of the different configurations
can be used together.

A transition will be disruptive, as only 30 of the packages have
upper bounds on their mtl dependencies, but I think we can reduce the
disruption.

The combination transformers + monads-fd is close to a compatible
replacement for mtl at the source level, except that State, Writer,
etc are now type synonyms, which will break some code.  Of course the
package names are also different.  We can't just rename monads-fd as
mtl-2.0, because Control.Monad.Identity and Control.Monad.Trans are in
the transformers package.  But we could make a compatibility version of
mtl along the lines of base3-compat.  (And we need to rename the modules
in monads-tf.)


More information about the Libraries mailing list