trace -package:matrix

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 and outputs the message to stderr. Depending on your terminal (settings), they may or may not be mixed.
>>> 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
Output a debug message to sterr, using trace, if tracing is enabled. Note: this writes to stderr even in pure instances.
apply a trace arrow and issue message to stderr
Warning: trace remains in code
Lens onto the Trace of a QDiagram.
Log a message.
Warning: trace remains in code
Warning: Trace statement left 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.
Internally log what occurred. Log will be re-played on failure.
see trace
Warning: Leaving traces in the code
Lens onto the Trace of a QDiagram.
Apply a monadic function to each element flowing through the stream and discard the results.
>>> Stream.drain $ Stream.trace print (Stream.enumerateFromTo 1 2)
1
2
Compare with tap.
Warning: trace remains in code
Append a message to the trace log.
Deprecated: Don't leave me in the code
Print a string as a trace.