| Safe Haskell | None |
|---|---|
| Language | GHC2024 |
Debug.TraceEmbrace
Description
The root module to be imported by applications and libraries.
Synopsis
Documentation
Wrap value which has opaque Show instance.
Constructors
| ShowTrace | |
Fields
| |
Instances
| Show (ShowTrace ByteString) Source # | |
Defined in Debug.TraceEmbrace.ByteString | |
| Show (ShowTrace ByteString) Source # | |
Defined in Debug.TraceEmbrace.ByteString | |
| Show (ShowTrace a) => Show (ShowTrace (Tagged t a)) Source # | |
| Show (ShowTrace a) => Show (ShowTrace (Maybe a)) Source # | |
| Show (ShowTrace a) => Show (ShowTrace [Tagged t a]) Source # | |
| Show (ShowTrace a) => Show (ShowTrace [a]) Source # | |
module Debug.TraceEmbrace.Config
tr :: String -> Q Exp Source #
TH version of trace and traceEvent
The message is formatted according to TraceMessageFormat.
The generated expression has type forall r (a :: TYPE r) b a. .
Rewrap a b => a -> aid is generated if effective trace level is lower than trace level threshold.
Example:
foo x = $(tr "get/x") x
Output:
Module::foo get; x : 132
trFunMarker :: Q Exp Source #
TH version of traceMarker where module and function
are used as a marker. Trace level is used.
trIo :: String -> Q Exp Source #
TH version of traceIO and traceEventIO
The message is formatted according to TraceMessageFormat.
Example:
foo x = $(trIo "get/x") >> pure x
Output:
Module::foo get; x : 132
trIoFunMarker :: Q Exp Source #
TH version of traceMarkerIO where module and function
are used as a marker. Trace level is not used.
tw :: String -> Q Exp Source #
TH version of traceWith and traceEventWith
The message is formatted according to TraceMessageFormat.
The generated expression has type forall r (a :: TYPE r) b a. (Show a, Rewrap a b) => a -> a.
id is generated if effective trace level is lower than trace level threshold.
Example:
foo x = $(tw "get/x") (x + 1)
Output:
Module::foo get; x : 132 => 133