Instrumenting Monadic Handlers #
This module provides effect-generic constructions for polynomial-functor
handlers. liftTarget changes the target monad through MonadLiftT, while
preInsert and postInsert add a side effect before or after each handled
operation. The writer specializations record response-independent or
response-dependent traces without depending on any oracle-specific API.
Lift every operation of a handler into a new target monad.
Instances For
Lifting a handler to its current target has no effect.
Run an effect before handling each operation.
The inserted effect is sequenced before the underlying handler. Whether its
effects remain observable if that handler subsequently fails depends on the
target monad's transformer order; for example, WriterT over Option discards
the log together with a failed result. The inserted effect's value is
discarded.
Instances For
Run an effect after handling each operation.
The inserted effect may depend on the response and is skipped if the underlying handler fails. Its result is discarded.
Instances For
Writer traces #
Response-independent writer tracing is before-insertion of tell.
Response-dependent writer tracing is after-insertion of tell.
Append-flavoured response-independent tracing.
Instances For
Append-flavoured before-tracing is before-insertion of tell.
Append-flavoured response-dependent tracing.
Instances For
Append-flavoured after-tracing is after-insertion of tell.