Evaluating the argument/result was my intention. Evaluating the computation itself might be useful in some cases, though.<div><br></div><div>Regards,</div><div><br></div><div>Dave<br><div><br><div class="gmail_quote">On Sat, Jan 21, 2012 at 3:20 PM, Yves Parès <span dir="ltr">&lt;<a href="mailto:yves.pares@gmail.com">yves.pares@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">&gt; (StrictT op) &gt;&gt;= f = StrictT (op &gt;&gt;= \ x -&gt; x `seq` runStrictT (f x))<br><br></div>
Are you sure? Here you evaluate the result, and not the computation itself.<br>Wouldn&#39;t it be:<br><br>(StrictT op) &gt;&gt;= f  = op ` seq` StrictT (op &gt;&gt;= \x -&gt; runStrictT (f x))<br>

<br>??<br><br><div class="gmail_quote">2012/1/21 David Barbour <span dir="ltr">&lt;<a href="mailto:dmbarbour@gmail.com" target="_blank">dmbarbour@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div class="h5">

<div class="gmail_quote"><div>On Sat, Jan 21, 2012 at 10:08 AM, Roman Cheplyaka <span dir="ltr">&lt;<a href="mailto:roma@ro-che.info" target="_blank">roma@ro-che.info</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



* David Barbour &lt;<a href="mailto:dmbarbour@gmail.com" target="_blank">dmbarbour@gmail.com</a>&gt; <a href="tel:%5B2012-01-21%2010" value="+12012012110" target="_blank">[2012-01-21 10</a>:01:00-0800]<br>
<div>&gt; As noted, IO is not strict in the value x, only in the operation that<br>
&gt; generates x. However, should you desire strictness in a generic way, it<br>
&gt; would be trivial to model a transformer monad to provide it.<br>
<br>
</div>Again, that wouldn&#39;t be a monad transformer, strictly speaking, because<br>
&quot;monads&quot; it produces violate the left identity law.<br></blockquote><div><br></div></div><div>It meets the left identity law in the same sense as the Eval monad from Control.Strategies.</div><div> <a href="http://hackage.haskell.org/packages/archive/parallel/3.1.0.1/doc/html/src/Control-Parallel-Strategies.html#Eval" target="_blank">http://hackage.haskell.org/packages/archive/parallel/3.1.0.1/doc/html/src/Control-Parallel-Strategies.html#Eval</a></div>



<div><br></div><div>That is, so long as values at each step can be evaluated to WHNF, it remains true that `return x &gt;&gt;= f` = f x.</div><div><br></div><div>I did mess up the def of &gt;&gt;=. I think it should be:</div>



<div>  (StrictT op) &gt;&gt;= f = StrictT (op &gt;&gt;= \ x -&gt; x `seq` runStrictT (f x))</div><div><br></div><div>But I&#39;m not interested enough to actually pull out an interpreter and test...</div><div><br></div><div>



Regards,</div><div><br></div><div>Dave</div><div><br></div></div>
<br></div></div><div class="im">_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org" target="_blank">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>
<br></div></blockquote></div><br>
</blockquote></div><br></div></div>