Re: [Haskell-cafe] debugtracehelpers Re: traceM and traceShowM
These woudl be much more useful if they flushed the output handle after each message. Then you know your trace messages will be displayed/written to a file. On Mon, Oct 19, 2009 at 1:51 PM, Thomas Hartman tphya...@gmail.com wrote: I have this and a couple other handy functions in DebugTraceHelpers: http://patch-tag.com/r/tphyahoo/DebugTraceHelpers/snapshot/current/content/pretty hackage: http://hackage.haskell.org/packages/archive/DebugTraceHelpers/0.12/doc/html/Debug-Trace-Helpers.html 2009/10/16 Martijn van Steenbergen mart...@van.steenbergen.nl: Hello, I propose the addition of the following two functions to module Debug.Trace: traceM :: Monad m = String - m () traceM msg = trace msg (return ()) traceShowM :: (Show a, Monad m) = a - m () traceShowM = traceM . show These functions allow tracing in any do-block. I often define them myself; I think they are useful in general. Deadline: 23 October 2009. Martijn. ___ Libraries mailing list librar...@haskell.org http://www.haskell.org/mailman/listinfo/libraries ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] debugtracehelpers Re: traceM and traceShowM
I don't know why people use trace this way instead of in the reverse form: debug = flip trace this way I can isolate debug code in the right from normal code: main= do a - getChar b - getChar `debug` (a=++ show a) let c= a+b`debug` (b=++ show b) ... and so on. I saw it for the first time in the DrIFt libtary. 2009/10/20 Justin Bailey jgbai...@gmail.com These woudl be much more useful if they flushed the output handle after each message. Then you know your trace messages will be displayed/written to a file. On Mon, Oct 19, 2009 at 1:51 PM, Thomas Hartman tphya...@gmail.com wrote: I have this and a couple other handy functions in DebugTraceHelpers: http://patch-tag.com/r/tphyahoo/DebugTraceHelpers/snapshot/current/content/pretty hackage: http://hackage.haskell.org/packages/archive/DebugTraceHelpers/0.12/doc/html/Debug-Trace-Helpers.html 2009/10/16 Martijn van Steenbergen mart...@van.steenbergen.nl: Hello, I propose the addition of the following two functions to module Debug.Trace: traceM :: Monad m = String - m () traceM msg = trace msg (return ()) traceShowM :: (Show a, Monad m) = a - m () traceShowM = traceM . show These functions allow tracing in any do-block. I often define them myself; I think they are useful in general. Deadline: 23 October 2009. Martijn. ___ Libraries mailing list librar...@haskell.org http://www.haskell.org/mailman/listinfo/libraries ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] debugtracehelpers Re: traceM and traceShowM
I have this and a couple other handy functions in DebugTraceHelpers: http://patch-tag.com/r/tphyahoo/DebugTraceHelpers/snapshot/current/content/pretty hackage: http://hackage.haskell.org/packages/archive/DebugTraceHelpers/0.12/doc/html/Debug-Trace-Helpers.html 2009/10/16 Martijn van Steenbergen mart...@van.steenbergen.nl: Hello, I propose the addition of the following two functions to module Debug.Trace: traceM :: Monad m = String - m () traceM msg = trace msg (return ()) traceShowM :: (Show a, Monad m) = a - m () traceShowM = traceM . show These functions allow tracing in any do-block. I often define them myself; I think they are useful in general. Deadline: 23 October 2009. Martijn. ___ Libraries mailing list librar...@haskell.org http://www.haskell.org/mailman/listinfo/libraries ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe