pprTrace package:ghc
If debug output is on, show some
SDoc on the screen
pprTraceException desc x action runs action, printing a
message if it throws an exception.
pprTraceIt desc x is equivalent to pprTrace desc (ppr x)
x
For when we want to show the user a non-fatal WARNING so that they can
report a GHC bug, but don't want to panic.
pprTraceWith desc f x is equivalent to pprTrace desc (f
x) x. This allows you to print details from the returned value as
well as from ambient variables.
Just warn about an assertion failure, recording the given file and
line number.