traceM and traceShowM

Martijn van Steenbergen martijn at van.steenbergen.nl
Wed Oct 21 03:36:55 EDT 2009


So the current idea is:

> withTrace :: Show a => a -> a
> withTrace x = trace (show x) x
> 
> traceM :: Monad m => String -> m ()
> traceM msg = trace msg (return ())
> 
> traceShowM :: (Show a, Monad m) => a -> m ()
> traceShowM = traceM . show

I'm not too good at writing documentation, so if someone would like to 
do that, please go ahead.

Does anyone have anything else to add?

Martijn.


Martijn van Steenbergen wrote:
> I propose the addition of the following two functions to module 
> Debug.Trace:



More information about the Libraries mailing list