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">&lt;<a href="mailto:es@ertes.de">es@ertes.de</a>&gt;</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 &lt;<a href="mailto:gcross@phys.washington.edu">gcross@phys.washington.edu</a>&gt; wrote:<br>
<br>
&gt; What is the current state of opinion regarding transformers versus<br>
&gt; monadLib versus mmtl versus ... etc.?  Transformers seems to be the<br>
&gt; &quot;blessed&quot; replacement for mtl, so when is it worthwhile to use the<br>
&gt; other libraries instead?<br>
&gt;<br>
&gt; (It hadn&#39;t even occurred to me to look closely at packages other than<br>
&gt; transformers for this purpose until I read a message earlier today<br>
&gt; from someone who said that he uses monadLib whenever he needs to use<br>
&gt; 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 &#39;transformers&#39; package.  But my<br>
impression was that the only advantage is that I wouldn&#39;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 &#39;ST s&#39;.  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>
&#39;abort&#39; function to escape from a ContT computation, so you don&#39;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 &gt;&gt;= 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>