Reference
Auto-generated API reference from nix-effects source.

Kernel

Freer monad kernel: Return/OpCall ADT with FTCQueue bind, send, map, seq.

bind

Monadic bind: sequence two computations.

bind comp f = case comp of
  Pure a       -> f a
  Impure e q   -> Impure e (snoc q f)

O(1) per bind via FTCQueue snoc (Kiselyov & Ishii 2015, Section 3.1).

impure

Create a suspended computation (OpCall constructor). Takes an effect and a continuation queue.

map

Map a function over the result of a computation (Functor instance).

pure

Lift a value into a pure computation (Return constructor).

send

Send an effect request. Returns the handler's response via continuation.

seq

Sequence a list of computations, threading state via bind. Returns the last result.