traceM and traceShowM

Sean Leather leather at cs.uu.nl
Fri Oct 23 05:29:22 EDT 2009


On Thu, Oct 22, 2009 at 19:44, Ian Lynagh wrote:

> 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.
>

I agree. It's easy enough to do withTrace "" if you don't want a message.

Sean
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/libraries/attachments/20091023/8cd49c06/attachment.html


More information about the Libraries mailing list