Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data Trace (m :: * -> *) k = Trace {
- traceMessage :: String
- traceCont :: 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
Documentation
data Trace (m :: * -> *) k Source #
Trace | |
|
Instances
Effect Trace Source # | |
HFunctor Trace Source # | |
Functor (Trace m) Source # | |
(Carrier sig m, Effect sig) => Carrier (Trace :+: sig) (TraceByReturningC m) Source # | |
Defined in Control.Effect.Trace eff :: (Trace :+: sig) (TraceByReturningC m) (TraceByReturningC m a) -> TraceByReturningC m a Source # | |
Carrier sig m => Carrier (Trace :+: sig) (TraceByIgnoringC m) Source # | |
Defined in Control.Effect.Trace eff :: (Trace :+: sig) (TraceByIgnoringC m) (TraceByIgnoringC m a) -> TraceByIgnoringC m a Source # | |
(MonadIO m, Carrier sig m) => Carrier (Trace :+: sig) (TraceByPrintingC m) Source # | |
Defined in Control.Effect.Trace eff :: (Trace :+: sig) (TraceByPrintingC m) (TraceByPrintingC m a) -> TraceByPrintingC m a Source # |
trace :: (Member Trace sig, Carrier sig m) => String -> m () Source #
Append a message to the trace log.
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 #