extensible-effects-5.0.0.1: An Alternative to Monad Transformers

Safe HaskellSafe
LanguageHaskell2010

Control.Eff.Trace

Description

A Trace effect for debugging

Synopsis

Documentation

data Trace v where Source #

Trace effect for debugging

Constructors

Trace :: String -> Trace () 
Instances
Handle Trace r a (IO k) Source #

Given a callback and request, respond to it

Instance details

Defined in Control.Eff.Trace

Methods

handle :: (Eff r a -> IO k) -> Arrs r v a -> Trace v -> IO k Source #

handle_relay :: (r ~ (Trace ': r'), Relay (IO k) r') => (a -> IO k) -> (Eff r a -> IO k) -> Eff r a -> IO k Source #

respond_relay :: (a -> IO k) -> (Eff r a -> IO k) -> Eff r a -> IO k Source #

withTrace :: a -> IO a Source #

Embed a pure value in Trace context

trace :: Member Trace r => String -> Eff r () Source #

Print a string as a trace.

runTrace :: Eff '[Trace] w -> IO w Source #

Run a computation producing Traces. The handler for IO request: a terminal handler