Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Documentation
TraceT is the standard implementation of MonadTrace
. Via a Reader
, it
keeps track of the default policy and reporter to use thoughout the stack, as
well as the current trace.
Instances
runTraceT :: Reporter -> TraceT m a -> m a Source #
Runs the TraceT
monad, by providing the default reporter. This does NOT
start a trace.
TODO: we could change this to always start a trace with a default name? This
would allow us to guarantee that there is always a current trace, but this
might not always be the correct behaviour: in practice, we would end up
generating one that spans the entire lifetime of the engine if runTraceT
were to be used from main
.
ignoreTraceT :: TraceT m a -> m a Source #
Run the TraceT
monad, but without actually tracing anything: no report
will be emitted, even if calls to newTraceWith
force the trace to be
sampled.