base-compat-0.13.1: A compatibility layer for base
Safe HaskellSafe-Inferred
LanguageHaskell2010

Debug.Trace.Compat

Synopsis

Documentation

traceShowId :: Show a => a -> a #

traceM :: Applicative f => String -> f () #

traceShowM :: (Show a, Applicative f) => a -> f () #

traceWith :: (a -> String) -> a -> a Source #

Like trace, but outputs the result of calling a function on the argument.

>>> traceWith fst ("hello","world")
hello
("hello","world")

Since: 4.18.0.0

traceShowWith :: Show b => (a -> b) -> a -> a Source #

Like traceWith, but uses show on the result of the function to convert it to a String.

>>> traceShowWith length [1,2,3]
3
[1,2,3]

Since: 4.18.0.0

traceEventWith :: (a -> String) -> a -> a Source #

Like traceEvent, but emits the result of calling a function on its argument.

Since: 4.18.0.0