[Haskell-cafe] Re: Transformers versus monadLib versus...

Ivan Miljenovic ivan.miljenovic at gmail.com
Wed Jul 7 23:59:11 EDT 2010

On 8 July 2010 13:48, Ertugrul Soeylemez <es at ertes.de> wrote:
> Ivan Miljenovic <ivan.miljenovic at gmail.com> wrote:
>> On 8 July 2010 13:36, Ertugrul Soeylemez <es at ertes.de> wrote:
>> > To be honest, I don't know any strength of MTL compared to
>> > transformers and monadLib.  Actually even transformers is quite
>> > primitive compared to monadLib.  The only real advantage is that it
>> > has flipped run functions and a built-in MaybeT.
>> mtl's advantages: wide pre-existing user base, etc.
> As said, I don't think this is a valid argument.  Windows has a much
> larger user base than Linux.  C++ has a much larger user base than
> Haskell.  We still use Haskell, and many of us use Linux.

My point was, was that if you need to pick a monad transformer library
and you've never done any before, then some people are likely to
choose mtl because it's currently the most-used library, it comes with
the platform and if they need to interact with another package that
uses a monad transformer library then it's more likely to be using mtl
than anything else.

>> transformers (especially when used with monads-{fd,tf}) advantage over
>> monadLib: pre-existing type aliases, documentation, easier to port old
>> code that was using mtl.
> If you don't use monadLib-specific features, then most code will run in
> monadLib as well as transformers without changes.  The Haddock
> documentation of monadLib is quite brief, but if you know how to use
> monad transformers, you won't have any problems.

I for one don't know how to use monad transformers (I mean, I've read
the section in RWH and could figure it out, but off the top of my head
I can't recall how to do all the lifting stuff, etc.).

> And I don't know what you mean by "pre-existing type aliases".


Ivan Lazar Miljenovic
Ivan.Miljenovic at gmail.com

More information about the Haskell-Cafe mailing list