News for hackers. Stuff that matters.
Re:The Haskell user experience by creichert on Wednesday August 05, 2015 @12:48PM (#10011060)
Using the trace trick needs to guard on False:

  myfun a b | trace ("myfun " ++ show a ++ " " ++ show b) False = undefined
  myfun a b = ...
See here for some other helpful trace functions:

https://hackage.haskell.org/package/base-4.8.1.0/docs/Debug-...

There is even a traceStack which will print a call stack if available.

There are no comments on this comment yet.