
5 Nov
2009
5 Nov
'09
12:25 p.m.
Simon Marlow wrote:
On 16/10/2009 14:22, Martijn van Steenbergen wrote:
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
is traceShowM really necessary? It doesn't save many characters, and fails the "don't name a composition" test.
No, it's not necessary at all. There's a bit of tension between not wanting to name a composition and being consistent with the rest of the module: traceM and traceShowM mirror the existing trace and traceShow functions. Martijn.