HORIZON HASKELLDocslts/ghc-9.14.x99ffbb82026-10-19Search packagesCtrl K
Theme: |

GHC 9.14.1 · lts/ghc-9.14.x · 99ffbb8 · 2026-10-19

Modulecontra-tracer-0.2.1.1Haskell2010

Control.Tracer.Arrow

Synopsis
datadata TracerA (m :: Type -> Type) a b where

Formal representation of a tracer arrow as a Kleisli arrow over some monad, but tagged so that we know whether it has any effects which will emit a trace.

Constructors

  • Emitting :: Kleisli m a x -> Kleisli m x b -> TracerA m a b

    An emitting part, followed by a non-emitting part. The non-emitting part is there so that later emitting parts can be tacked-on later.

  • Squelching :: Kleisli m a b -> TracerA m a b

    No emitting. There may be side-effects, but they are assumed to be benign and will be discarded by runTracerA.

Instances3Category, Arrow, ArrowChoice
valueeffect :: (a -> m b) -> TracerA m a b

Do a non-emitting effect. This effect will only be run if some part of the tracer downstream emits (see emit).

valuesquelch :: Applicative m => TracerA m a ()

Ignore the input and do not emit. The name is intended to lead to clear and suggestive arrow expressions.

valuenat :: (forall x. m x -> n x) -> TracerA m a b -> TracerA n a b

Use a natural transformation to change the underlying monad.