monadLib looks nice, indeed, but the major problem with using it resides in the fact that most of the libraries on hackage use MTL.<br>Must be tedious to have to use two monad libraries at the same time...<br><br><div class="gmail_quote">
2010/7/6 Ertugrul Soeylemez <span dir="ltr"><<a href="mailto:es@ertes.de">es@ertes.de</a>></span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im">Gregory Crosswhite <<a href="mailto:gcross@phys.washington.edu">gcross@phys.washington.edu</a>> wrote:<br>
<br>
> What is the current state of opinion regarding transformers versus<br>
> monadLib versus mmtl versus ... etc.? Transformers seems to be the<br>
> "blessed" replacement for mtl, so when is it worthwhile to use the<br>
> other libraries instead?<br>
><br>
> (It hadn't even occurred to me to look closely at packages other than<br>
> transformers for this purpose until I read a message earlier today<br>
> from someone who said that he uses monadLib whenever he needs to use<br>
> monad transformers, and it has now made me curious about them.)<br>
<br>
</div>That would be me. When I was sick of flipping runWhateverT all the<br>
time, I had a closer look at the 'transformers' package. But my<br>
impression was that the only advantage is that I wouldn't need to flip<br>
anymore.<br>
<br>
I compared it to monadLib, which does a lot more. It saves me from<br>
having to do multi-lifts in complicated monads and it has a generalized<br>
MonadIO, called BaseM, which works for other lowest-level-monads, too,<br>
like 'ST s'. It includes a ChoiceT monad transformer, which is like<br>
ListT, but is not broken.<br>
<br>
Further it has very useful monadic functions. For example there is an<br>
'abort' function to escape from a ContT computation, so you don't need<br>
to use that ugly callCC, if you just want early exit route. You also<br>
get labelled jumps for free, if you ever need them desperately.<br>
<br>
As an interesting feature, if you have a monad, which is isomorphic to a<br>
known monad, you can derive all the Functor/Monad instance functions<br>
from this isomorphism. All you need to do is to tell monadLib how one<br>
would turn a computation of the monad in question into a computation of<br>
the known monad.<br>
<br>
<br>
Greets,<br>
Ertugrul<br>
<font color="#888888"><br>
<br>
--<br>
nightmare = unsafePerformIO (getWrongWife >>= sex)<br>
<a href="http://ertes.de/" target="_blank">http://ertes.de/</a><br>
</font><div><div></div><div class="h5"><br>
<br>
_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
</div></div></blockquote></div><br>