On Mon, Nov 12, 2012 at 5:15 AM, Richard Eisenberg &lt;<a href="mailto:eir@cis.upenn.edu">eir@cis.upenn.edu</a>&gt; wrote:<br>&gt;<br>&gt; I&#39;ve recently used the conveniently-typed (pprTrace :: String -&gt; SDoc -&gt; a -&gt; a) for this purpose. You have to compile with -DDEBUG, but it works great.<br>
&gt;<br>&gt; Richard<br><br>To use pprTrace you don&#39;t actually need to compile with -DDEBUG, it only checks if -dno-debug-output has been specified on the command line:<br><a href="http://www.haskell.org/ghc/docs/latest/html/libraries/ghc/src/Outputable.html#pprTrace">http://www.haskell.org/ghc/docs/latest/html/libraries/ghc/src/Outputable.html#pprTrace</a><br>
<a href="http://www.haskell.org/ghc/docs/latest/html/libraries/ghc/src/StaticFlags.html#opt_NoDebugOutput">http://www.haskell.org/ghc/docs/latest/html/libraries/ghc/src/StaticFlags.html#opt_NoDebugOutput</a><br><div><br></div>
<div>Cheers,</div><div>Michal</div>