trace

The trace function outputs the trace message given as its first argument, before returning the second argument as its result. For example, this returns the value of f x but first outputs the message.
>>> let x = 123; f = show

>>> trace ("calling f with x = " ++ show x) (f x)
"calling f with x = 123
123"
The trace function should only be used for debugging, or for monitoring execution. The function is not referentially transparent: its type indicates that it is a pure function but it has the side effect of outputting the trace message.
Compute the trace of a matrix
>>> trace (V2 (V2 a b) (V2 c d))
a + d
Compute the trace of a matrix
>>> trace (V2 (V2 a b) (V2 c d))
a + d
apply a trace arrow and issue message to stderr
Warning: trace remains in code
Output a debug message to sterr, using trace, if tracing is enabled. Note: this writes to stderr even in pure instances.
Lens onto the Trace of a QDiagram.
internally log what occurred. Log will be re-played on failure.
see trace
Warning: Leaving traces in the code
Sum of the elements in the diagonal. See also getDiag. Example:
( 1 2 3 )
( 4 5 6 )
trace ( 7 8 9 ) = 15
Warning: Trace statement left in code
Print a string as a trace.
Warning: trace remains in code
A trace for the X monad. Logs a string to stderr. The result may be found in your .xsession-errors file
Printing a string in a trace.
Warning: trace remains in code
The trace function outputs the trace message given as its first argument, before returning the second argument as its result. For example, this returns the value of f x but first outputs the message.
>>> let x = 123; f = show

>>> trace ("calling f with x = " ++ show x) (f x)
"calling f with x = 123
123"
The trace function should only be used for debugging, or for monitoring execution. The function is not referentially transparent: its type indicates that it is a pure function but it has the side effect of outputting the trace message.
Apply a monadic function to each element flowing through the stream and discard the results.
> S.drain $ S.trace print (S.enumerateFromTo 1 2)
1
2
Compare with tap.
Matrix trace
Append a message to the trace log.