| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Control.Effect.Trace
Contents
Description
An effect that provides a record of String values ("traces") aggregate during the execution of a given computation.
Predefined carriers:
- Control.Carrier.Trace.Printing, which logs to stderr in a
MonadIOcontext. - Control.Carrier.Trace.Returning, which aggregates all traces in a @[String].
- Control.Carrier.Trace.Ignoring, which discards all traced values.
Since: 0.1.0.0
Trace effect
Since: 0.1.0.0
Constructors
| Trace | |
Fields
| |
Instances
| Effect Trace Source # | |
| HFunctor Trace Source # | |
| Functor m => Functor (Trace m) Source # | |
| Generic1 (Trace m :: Type -> Type) Source # | |
| (MonadIO m, Algebra sig m) => Algebra (Trace :+: sig) (TraceC m) Source # | |
| Algebra sig m => Algebra (Trace :+: sig) (TraceC m) Source # | |
| (Algebra sig m, Effect sig) => Algebra (Trace :+: sig) (TraceC m) Source # | |
| type Rep1 (Trace m :: Type -> Type) Source # | |
Defined in Control.Effect.Trace type Rep1 (Trace m :: Type -> Type) = D1 (MetaData "Trace" "Control.Effect.Trace" "fused-effects-1.0.0.0-inplace" False) (C1 (MetaCons "Trace" PrefixI True) (S1 (MetaSel (Just "traceMessage") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String) :*: S1 (MetaSel (Just "traceCont") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 m))) | |
Re-exports
class (HFunctor sig, Monad m) => Algebra sig m | m -> sig Source #
The class of carriers (results) for algebras (effect handlers) over signatures (effects), whose actions are given by the alg method.
Since: 1.0.0.0
Minimal complete definition
Instances
type Has eff sig m = (Members eff sig, Algebra sig m) Source #
m is a carrier for sig containing eff.
Note that if eff is a sum, it will be decomposed into multiple Member constraints. While this technically allows one to combine multiple unrelated effects into a single Has constraint, doing so has two significant drawbacks:
- Due to a problem with recursive type families, this can lead to significantly slower compiles.
- It defeats
ghc’s warnings for redundant constraints, and thus can lead to a proliferation of redundant constraints as code is changed.