fused-effects-1.1.0.0: A fast, flexible, fused effect system.

Control.Effect.Labelled

Description

Labelled effects, allowing flexible disambiguation and dependency of parametric effects.

Among other things, this can be used to:

• Improve inference by relating parametric effect types to some arbitrary label. This can be used to lift existing effect operations, or to define new ones; cf Control.Effect.Reader.Labelled, Control.Effect.State.Labelled for examples of lifting effect operations into labelled effect operations.
• Express stronger relationships between an effect and the context it’s run in, e.g. to give an effect shadowing semantics, allowing only one instance of it to be active at a time in a given context.
• Resolve ambiguous types by relating parameters to a concrete label type.

Since: 1.0.2.0

Synopsis

# Documentation

runLabelled :: forall label sub m a. Labelled label sub m a -> sub m a Source #

Since: 1.0.2.0

newtype Labelled (label :: k) (sub :: (Type -> Type) -> Type -> Type) m a Source #

An effect transformer turning effects into labelled effects, and a carrier transformer turning carriers into labelled carriers for the same (labelled) effects.

Since: 1.0.2.0

Constructors

 Labelled (sub m a)

#### Instances

Instances details