How to best add logging/debugging code?
Malcolm Wallace
Malcolm.Wallace at cs.york.ac.uk
Thu Nov 27 14:19:53 EST 2003
> > Is there a list of problems anywhere with using trace? For
> > example does it affect evaluation order?
Apart from changing the evaluation order of expressions, trace has
other drawbacks, noted I think by Lennart(?) but I can't remember
exactly where. One issue is this:
Consider an expression where the printable argument to 'trace' causes
the evaluation of another expression which itself is defined using
'trace'. The nested 'trace' outputs will appear interspersed with
each other. In recursive definitions this can become quite painful
to disentangle.
Regards,
Malcolm
More information about the Haskell
mailing list