
12 Nov
2012
12 Nov
'12
4:09 a.m.
On Mon, Nov 12, 2012 at 5:15 AM, Richard Eisenberg
I've recently used the conveniently-typed (pprTrace :: String -> SDoc ->
a -> a) for this purpose. You have to compile with -DDEBUG, but it works great.
Richard
To use pprTrace you don't actually need to compile with -DDEBUG, it only checks if -dno-debug-output has been specified on the command line: http://www.haskell.org/ghc/docs/latest/html/libraries/ghc/src/Outputable.htm... http://www.haskell.org/ghc/docs/latest/html/libraries/ghc/src/StaticFlags.ht... Cheers, Michal