
On Wed, Jun 28, 2017 at 2:48 PM, David McBride
http://hackage.haskell.org/package/base-4.9.1.0/docs/ Debug-Trace.html#v:traceM
My sense is that you should probably be using traceIO rather than the pure trace functions. The pure functions do not sequence with respect to IO and once the expression you are tracing has been fully evaluated, they will never take effect again.
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. -- brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net