On Sun, Apr 8, 2012 at 3:46 AM, Roman Cheplyaka wrote:
> Could you remind us what the difference between mtl and monads-fd is
> days? Is that described anywhere?
In the beginning there was the MTL, and it was good.
Eventually the fact that the MTL requires multiparameter type classes,
flexible instances, and most gallingly, undecidable instances and yet was
part of the Haskell platform started to bother some people.
Other niggling problems with the MTL were starting to bother folks, so
other MTL-like packages mmtl, monadLib, etc. started to form at this time.
So Ross, who was maintaining the MTL at the time, wrote 'transformers',
which provided a Haskell 98 core, and set about writing monads-fd and
monads-tf fixing up some problems with the MTL as he went, and reducing
code duplication (by making State s into just StateT s Identity rather than
a separate type, for instance.)
The general idea seemed to be that we could get the entire community to
move over in one fell swoop to something much nicer and more maintainable
that still felt mostly the same.
With both monads-tf and monads-fd, I suppose the thought was that folks
could use whichever version appealed to them the most.
The problem was that -- in hindsight -- this choice was kind of an awkward
idea, because monads-fd and monads-tf both use exactly the same module
names! So when you write a library you are forced to choose one or the
other and could not gracefully decide to supply both without turning to
horrible package imports or making multiple packages crammed full of orphan
instances, fragmenting the monad transformer library user base 3 ways,
since not only did they conflict with each other, but they also conflicted
with the original mtl, which by sheer inertia wasn't going anywhere any
But, nobody wanted to maintain the stinking carcass that was the old MTL by
this point. The core Haskell 98 transformers package was a pretty nice
improvement though, and it was clear that the monads-fd approach was a
nicer overall design and where all the improvements were being
To deal with this fragmentation, ultimately, it was decided somewhere
around the end of 2010 to rename monads-fd to mtl 2.0, and keep it built on
transformers. So effectively, the MTL _is_ what became of monads-fd.
redirects you to mtl.
In the meantime, monads-tf was pretty much abandoned. It may have been
perfectly reasonable to maintain separately, but it IS a lot of boilerplate
to force on everyone who wants decent library support, and it really would
need to be have a separate set of module names to able to coexist with the
MTL in usable fashion.
*TL;DR* monads-fd became mtl 2.0 back in 2010.