polysemy-0.1.2.0: Higher-order, low-boilerplate, zero-cost free monads.

Safe HaskellNone
LanguageHaskell2010

Polysemy.Trace

Contents

Synopsis

Effect

data Trace m a where Source #

An effect for logging strings.

Constructors

Trace :: String -> Trace m () 
Instances
type DefiningModule (Trace :: k -> Type -> Type) Source # 
Instance details

Defined in Polysemy.Trace

type DefiningModule (Trace :: k -> Type -> Type) = "Polysemy.Trace"

Actions

trace :: forall r. Member Trace r => String -> Sem r () Source #

Interpretations

runTraceIO :: Member (Lift IO) r => Sem (Trace ': r) a -> Sem r a Source #

Run a Trace effect by printing the messages to stdout.

runIgnoringTrace :: Member (Lift IO) r => Sem (Trace ': r) a -> Sem r a Source #

Run a Trace effect by ignoring all of its messages.

runTraceAsOutput :: Member (Output String) r => Sem (Trace ': r) a -> Sem r a Source #

Transform a Trace effect into a Output String effect.

Interpretations for Other Effects

runOutputAsTrace :: (Show w, Member Trace r) => Sem (Output w ': r) a -> Sem r a Source #

Transform a Trace effect into a Output String effect.

Since: 0.1.2.0