tracer-transformers-0.1.0.1: tracer transformers and examples showing their use
Safe Haskell None
Language Haskell2010

Control.Tracer.Transformers

Synopsis

Documentation

newtype Folding a f Source #

Constructors

Folding f

counting :: forall m a. MonadIO m => Tracer m ( Counting a) -> m ( Tracer m a) Source #

A stateful tracer transformer that substitutes messages with a monotonically incrementing occurence count.

fanning :: forall m a. (a -> Tracer m a) -> Tracer m a Source #

A pure tracer combinator that allows to decide a further tracer to use, based on the message being processed.

folding :: forall m f a. MonadIO m => (f -> a -> f) -> f -> Tracer m ( Folding a f) -> m ( Tracer m a) Source #

A generalised trace transformer that provides evolving state, defined as a strict left fold.