<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Jun 28, 2017 at 2:48 PM, David McBride <span dir="ltr"><<a href="mailto:toad3k@gmail.com" target="_blank">toad3k@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><a href="http://hackage.haskell.org/package/base-4.9.1.0/docs/Debug-Trace.html#v:traceM" rel="noreferrer" target="_blank">http://hackage.haskell.org/<wbr>package/base-4.9.1.0/docs/<wbr>Debug-Trace.html#v:traceM</a><br>
<br>
My sense is that you should probably be using traceIO rather than the<br>
pure trace functions.  The pure functions do not sequence with respect<br>
to IO and once the expression you are tracing has been fully<br>
evaluated, they will never take effect again.</blockquote><div><br></div><div>This, and remember that IO is a bit of a trick: the expressions you build are in fact pure, they are *descriptions* of impure computations. Once a pure description produces a description of a low-level, impure I/O action, the *evaluation* is done. *Execution* is separate and not affected (or for that matter effected).  (As if we had: data IO a = GetChar | PutChar c | ... except typing that would get 'interesting'.) So things like 'traceShow' are done once in the process of evaluating your IO down to a sequence of low-level actions, and actually performing those actions is distinct from this and done later.</div></div><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>brandon s allbery kf8nh                               sine nomine associates</div><div><a href="mailto:allbery.b@gmail.com" target="_blank">allbery.b@gmail.com</a>                                  <a href="mailto:ballbery@sinenomine.net" target="_blank">ballbery@sinenomine.net</a></div><div>unix, openafs, kerberos, infrastructure, xmonad        <a href="http://sinenomine.net" target="_blank">http://sinenomine.net</a></div></div></div>
</div></div>