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

Yves Parès limestrael at gmail.com
Tue Jul 6 04:37:10 EDT 2010


monadLib looks nice, indeed, but the major problem with using it resides in
the fact that most of the libraries on hackage use MTL.
Must be tedious to have to use two monad libraries at the same time...

2010/7/6 Ertugrul Soeylemez <es at ertes.de>

> Gregory Crosswhite <gcross at phys.washington.edu> wrote:
>
> > What is the current state of opinion regarding transformers versus
> > monadLib versus mmtl versus ... etc.?  Transformers seems to be the
> > "blessed" replacement for mtl, so when is it worthwhile to use the
> > other libraries instead?
> >
> > (It hadn't even occurred to me to look closely at packages other than
> > transformers for this purpose until I read a message earlier today
> > from someone who said that he uses monadLib whenever he needs to use
> > monad transformers, and it has now made me curious about them.)
>
> That would be me.  When I was sick of flipping runWhateverT all the
> time, I had a closer look at the 'transformers' package.  But my
> impression was that the only advantage is that I wouldn't need to flip
> anymore.
>
> I compared it to monadLib, which does a lot more.  It saves me from
> having to do multi-lifts in complicated monads and it has a generalized
> MonadIO, called BaseM, which works for other lowest-level-monads, too,
> like 'ST s'.  It includes a ChoiceT monad transformer, which is like
> ListT, but is not broken.
>
> Further it has very useful monadic functions.  For example there is an
> 'abort' function to escape from a ContT computation, so you don't need
> to use that ugly callCC, if you just want early exit route.  You also
> get labelled jumps for free, if you ever need them desperately.
>
> As an interesting feature, if you have a monad, which is isomorphic to a
> known monad, you can derive all the Functor/Monad instance functions
> from this isomorphism.  All you need to do is to tell monadLib how one
> would turn a computation of the monad in question into a computation of
> the known monad.
>
>
> Greets,
> Ertugrul
>
>
> --
> nightmare = unsafePerformIO (getWrongWife >>= sex)
> http://ertes.de/
>
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20100706/25cb386b/attachment.html


More information about the Haskell-Cafe mailing list