cleff-0.3.1.0: Fast and concise extensible effects
Copyright(c) 2021 Xy Ren
LicenseBSD3
Maintainerxy.r@outlook.com
Stabilityexperimental
Portabilitynon-portable (GHC only)
Safe HaskellTrustworthy
LanguageHaskell2010

Cleff.Trace

Description

 
Synopsis

Effect

data Trace :: Effect where Source #

An effect capable of logging messages, mostly for debugging purposes.

Constructors

Trace :: String -> Trace m () 

Operations

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

Output a trace message.

Interpretations

runTraceHandle :: IOE :> es => Handle -> Eff (Trace ': es) a -> Eff es a Source #

Run the Trace effect by writing to a Handle.

runTraceStdout :: IOE :> es => Eff (Trace ': es) ~> Eff es Source #

Run the Trace effect by writing to stdout.

runTraceStderr :: IOE :> es => Eff (Trace ': es) ~> Eff es Source #

Run the Trace effect by writing to stderr.

ignoreTrace :: Eff (Trace ': es) ~> Eff es Source #

Run the Trace effect by ignoring all outputs altogether.

traceToOutput :: Eff (Trace ': es) ~> Eff (Output String ': es) Source #

Transform the Trace effect into an Output String effect.