Skip to content
Snippets Groups Projects
Commit 94ff2134 authored by Oleg Alexander's avatar Oleg Alexander Committed by Marge Bot
Browse files

Update doc string for traceShow

Updated doc string for traceShow.
parent 5643ecf9
No related branches found
No related tags found
No related merge requests found
......@@ -143,13 +143,15 @@ traceId a = trace a a
Like 'trace', but uses 'show' on the argument to convert it to a 'String'.
This makes it convenient for printing the values of interesting variables or
expressions inside a function. For example here we print the value of the
expressions inside a function. For example, here we print the values of the
variables @x@ and @y@:
>>> let f x y = traceShow (x,y) (x + y) in f (1+2) 5
(3,5)
>>> let f x y = traceShow ("x", x, "y", y) (x + y) in f (1+2) 5
("x",3,"y",5)
8
Note in this example we also create simple labels just by including some strings.
-}
traceShow :: Show a => a -> b -> b
traceShow = trace . show
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment