Hackage has several packages for monodal transformers:
- mtl : Monad Transformer Library
- transformers : Concrete functor and monad transformers
- monads-fd : Monad classes using functional dependencies
- monads-tf : Monad classes using type families
- monadLib : a collection of monad transformers.
- mtl-tf : Monad Transformer Library using type families.
- mmtl : Monad Modular Transformer Library.
- mtlx : Monad type transformer library with type indices providing free copies.
- compose-trans : Composite Monad Transformers
(and maybe I missed some)
Which one will we use?
mtl is the one on the Haskell platform, but I continue to hear from reddit that it is not being disclosed.
But what's wrong with choosing anyway, isn't that just a good thing?
Well, I saw how, for example, data access authors should have done all this to satisfy only the popular options:
- data-accessor-monadLib library: Accessor functions for monads monadLib
- data-accessor-monads-fd library: use Accessor to access state in monad-fd State monad class
- data-accessor-monads-tf library: use Accessor to access state in monads-tf. A family of states like monad.
- data-accessor-mtl library: use Accessor to access state in mtl State monad class
- converter adapter data library: use Accessor to access state in State monad transformers
I assume that if this happens, and for example, several competing Arrow packages will develop, we will see something like: spoonklink-arrows-transformers, spoonklink-arrows-monadLib, spoonklink-tfArrows-transformers, spoonklink-tfArrows-monadLib, ...
And then I'm worried that if spoonklink is forked, Hackage will run out of disk space. :)
Questions:
- Why are there so many monad transformer packages?
- Why is mtl [considered] uncool?
- What are the main differences?
- Most of these seemingly competing packages were written by Andy Gill and are supported by Ross Paterson. Does this mean that these packages do not compete, but work in some way? And do Andy and Ross think any of their own packages are out of date?
- Which one do you and you use?
haskell monads monad-transformers
yairchu May 04 '10 at 22:51 2010-05-04 22:51
source share