
Hi, Am Freitag, den 16.10.2009, 15:22 +0200 schrieb Martijn van Steenbergen:
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
thanks to your mail I found out about traceShow. This does save some time, but I still find myself inserting (\x -> trace (show x) x) or now (\x -> traceShow x x) into chained functions. If Debug.Trace, Control.Monad.Instances and Control.Monad happend to be in scope, this can be abbreviated by join traceShow :: (Show a) => a -> a but maybe with a good name, this would be useful in Debug.Trace directly? I’d really appreciate such a function when debugging code written in points-free style. Greetings, Joachim -- Joachim "nomeata" Breitner mail: mail@joachim-breitner.de | ICQ# 74513189 | GPG-Key: 4743206C JID: nomeata@joachim-breitner.de | http://www.joachim-breitner.de/ Debian Developer: nomeata@debian.org