Could iteratee depend on mtl instead of transformers?
ross at soi.city.ac.uk
Tue Nov 17 19:57:19 EST 2009
On Tue, Nov 17, 2009 at 07:33:05PM -0500, Edward Kmett wrote:
> For symmetry I agree both should probably be renamed.
Naming suggestions are welcome. Also comments on the idea of dropping
the non-class modules from monads-*.
> What are the current breaking changes?
> I gather from the discussion that State is no longer separate from
> StateT, along with Reader, Writer, RWS, Error, mutatis mutandis to
> obviate the need for both a base monad and transformer.
Right, so modules that declare instances of State, etc, or use their
data constructors, will break. In the former case the instances will
in most cases become superfluous.
Some packages declare orphan Applicative or Alternative instances,
which will also become superfluous.
The Functor instances in transformers depend on Functor rather than
monad. The breakage can be fixed by adding functor instances.
> I guess the question is then, when should code start looking to changing
> their dependencies over to monads-tf and monads-fd?
> A cleanly demarked cut over would be useful to get us out of this limbo state
> that helps nobody.
According to Ganesh's survey, 17 packages (and their dependents) on
hackage would be broken by turning mtl into a compatibility layer over
transformers+monads-fd. They would need to be updated, but need not
switch to monads-tf or monads-fd. Or they could avoid breakage by
adding a dependency mtl < 2. Individual packages could switch to
the new packages at their leisure.
I agree that the current situation is problematic -- I think we should
press on and replace the mtl.
More information about the Libraries