Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data Trace m k = Trace {
- traceMessage :: String
- traceCont :: m k
- trace :: (Member Trace sig, Carrier sig m) => String -> m ()
- runTraceByPrinting :: TraceByPrintingC m a -> m a
- newtype TraceByPrintingC m a = TraceByPrintingC {
- runTraceByPrintingC :: m a
- runTraceByIgnoring :: TraceByIgnoringC m a -> m a
- newtype TraceByIgnoringC m a = TraceByIgnoringC {
- runTraceByIgnoringC :: m a
- runTraceByReturning :: Functor m => TraceByReturningC m a -> m ([String], a)
- newtype TraceByReturningC m a = TraceByReturningC {
- runTraceByReturningC :: StateC [String] m a
- class (HFunctor sig, Monad m) => Carrier sig m | m -> sig
- class Member (sub :: (* -> *) -> * -> *) sup
- run :: PureC a -> a
Trace effect
Trace | |
|
Instances
trace :: (Member Trace sig, Carrier sig m) => String -> m () Source #
Append a message to the trace log.
Trace carriers
runTraceByPrinting :: TraceByPrintingC m a -> m a Source #
newtype TraceByPrintingC m a Source #
Instances
runTraceByIgnoring :: TraceByIgnoringC m a -> m a Source #
Run a Trace
effect, ignoring all traces.
run (runTraceByIgnoring (trace a *> pure b)) === b
newtype TraceByIgnoringC m a Source #
Instances
runTraceByReturning :: Functor m => TraceByReturningC m a -> m ([String], a) Source #
Run a Trace
effect, returning all traces as a list.
run (runTraceByReturning (trace a *> trace b *> pure c)) === ([a, b], c)
newtype TraceByReturningC m a Source #
Instances
Re-exports
class (HFunctor sig, Monad m) => Carrier sig m | m -> sig Source #
The class of carriers (results) for algebras (effect handlers) over signatures (effects), whose actions are given by the eff
method.