Navigation

Kernel

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

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

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).

kleisli

Kleisli composition: compose two Kleisli arrows (a -> M b) and (b -> M c) into (a -> M c).

map

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

pipe

Chain a computation through a list of Kleisli arrows, threading results via bind.

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.