traceM and traceShowM

Ian Lynagh igloo at earth.li
Thu Oct 22 13:44:22 EDT 2009


On Wed, Oct 21, 2009 at 09:36:55AM +0200, Martijn van Steenbergen wrote:
> So the current idea is:
>
>> withTrace :: Show a => a -> a
>> withTrace x = trace (show x) x
>
> Does anyone have anything else to add?

I would expect

withTrace :: Show a => String -> a -> a
withTrace str x = trace (str ++ show x) x

to be more useful.


Thanks
Ian



More information about the Libraries mailing list