Hackage has several packages for monad transformers:
A bunch of them are almost completely equivalent:
mtl
uses GHC extensions, but transformers
is Haskell 98.monads-fd
and monads-tf
are add-ons to transformers
, using functional dependencies and type families respectively, both providing the functionality in mtl
that's missing from transformers
.mtl-tf
is mtl
reimplemented using type families.So essentially, mtl
== transformers
++ monads-fd
, mtl-tf
== transformers
++ monads-tf
. The improved portability and modularity of transformers
and its associated packages is why mtl
is uncool these days, I think.
mmtl
and mtlx
both seem to be similar to and/or based on mtl
, with API differences and extra features.
MonadLib
seems to have a rather different take on matters, but I'm not familiar with it directly. Also seems to use a lot of GHC extensions, more than the others.
At a glance compose-trans
seems to be more like metaprogramming stuff for creating monad transformers. It claims to be compatible with Control.Monad.Trans
which... I guess means mtl
?
At any rate, I'd suggest the following decision algorithm:
transformers
& co., help us lay mtl
to rest.mtl
in a large project? transformers
isn't completely compatible, but no one will kill you for not switching.