<div dir="ltr">I'll say that this conversation caused me to rewrite some networking code I had written in a free monad as mtl.  It is faster and simpler, right?  But transformer stacks with all their typeclasses are really hard to work with and I don't think it was worth it in the end.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Oct 19, 2016 at 8:29 AM, Damian Nadales <span dir="ltr"><<a href="mailto:damian.nadales@gmail.com" target="_blank">damian.nadales@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I was thinking, besides the evaluation of performance, the simplicity<br>
of the approach is also important ("developer time is more expensive<br>
than CPU time" anyone?). Note that I said simple and not easy ;)<br>
<br>
I guess this aspect is a rather subjective one, but maybe there are<br>
elements that can be intuitively quantified. Right now I'm playing<br>
with free monads and MTL, to have an idea which one seems simpler to<br>
me.<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
<br>
On Mon, Oct 17, 2016 at 8:06 PM, Julian <<a href="mailto:hasufell@hasufell.de">hasufell@hasufell.de</a>> wrote:<br>
> On 15/10/16 15:49, Joachim Breitner wrote:<br>
>> Hi,<br>
>><br>
>> Am Freitag, den 14.10.2016, 17:35 +0200 schrieb Damian Nadales:<br>
>>> Do you have<br>
>>> any experience using any of these approaches. If so would you mind<br>
>>> sharing? ;)<br>
>><br>
>> I don’t have an answer to contribute, but I would be very interested in<br>
>> hearing about experiences in terms of their relative runtime<br>
>> performance.<br>
>><br>
>> My gut feeling is that an an indirect function call for every (>>=),<br>
>> with many calls to `lift` each time, would make a deep monad<br>
>> transformer stack much more expensive. A free monad approach seems to<br>
>> be more sensible to me. But maybe GHC is doing a better job optimizing<br>
>> this than I would think?<br>
>><br>
>> So if you have any number-supported evidence about this, possibly from<br>
>> a real-world application where you tried to use one or the other,<br>
>> please share it with us!<br>
>><br>
><br>
> There's a paper from Oleg discussing "Freer Monads, More Extensible<br>
> Effects": <a href="http://okmij.org/ftp/Haskell/extensible/more.pdf" rel="noreferrer" target="_blank">http://okmij.org/ftp/Haskell/<wbr>extensible/more.pdf</a><br>
><br>
> The conclusion there seems to be that the EE approach is more<br>
> "efficient". But you'll have to look at the concrete performance cases<br>
> and data yourself to make a judgement.<br>
><br>
> ______________________________<wbr>_________________<br>
> Haskell-Cafe mailing list<br>
> To (un)subscribe, modify options or view archives go to:<br>
> <a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-<wbr>bin/mailman/listinfo/haskell-<wbr>cafe</a><br>
> Only members subscribed via the mailman list are allowed to post.<br>
______________________________<wbr>_________________<br>
Haskell-Cafe mailing list<br>
To (un)subscribe, modify options or view archives go to:<br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-<wbr>bin/mailman/listinfo/haskell-<wbr>cafe</a><br>
Only members subscribed via the mailman list are allowed to post.</div></div></blockquote></div><br></div>