ouroboros-consensus-0.21.0.0: Consensus layer for the Ouroboros blockchain protocol
Safe HaskellSafe-Inferred
LanguageHaskell2010

Test.Util.Tracer

Synopsis

Documentation

recordingTracerIORefIO (Tracer IO ev, IO [ev]) Source #

Create a Tracer that stores all events in an IORef that is atomically updated. The second return value lets you obtain the events recorded so far (from oldest to newest). Obtaining the events does not erase them.

recordingTracerM ∷ ∀ m ev. Monad m ⇒ m (Tracer m ev, m [ev]) Source #

Like recordingTracerIORef, but lifts IO to an arbitrary applicative. This is useful to record events without changing the scheduling during a test.

recordingTracerTVarMonadSTM m ⇒ m (Tracer m ev, m [ev]) Source #

Create a Tracer that stores all events in a TVar that is atomically updated. The second return value lets you obtain the events recorded so far (from oldest to newest). Obtaining the events does not erase them.