**Packages**- is:exact
- base
- linear
- comonad
- hxt
- protolude
- pandoc
- diagrams-lib
- diagrams-core
- shelly
- classy-prelude
- matrix
- rio
- extensible-effects
- universum
- xmonad
- xmonad-contrib
- freer-simple
- relude
- rebase
- ghc
- ghc-lib-parser
- streamly
- sparse-linear-algebra
- polysemy
- fused-effects

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

>>> let x = 123; f = show >>> trace ("calling f with x = " ++ show x) (f x) "calling f with x = 123 123"The trace function should

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

Output a debug message to sterr, using trace, if tracing is
enabled. Note: this writes to stderr even in pure instances.

Sum of the elements in the diagonal. See also getDiag. Example:

( 1 2 3 ) ( 4 5 6 ) trace ( 7 8 9 ) = 15

Print a string as a trace.

Printing a string in a 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.
*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.

>>> let x = 123; f = show >>> trace ("calling f with x = " ++ show x) (f x) "calling f with x = 123 123"The trace function should

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 2Compare with tap.

Matrix trace

Append a message to the trace log.