package algaeff

  1. Overview
  2. Docs
include Param
type elt

The type of elements.

module ID : sig ... end

The type of IDs and its friends.

type id = ID.t

The type of unique IDs. The client should not assume a particular indexing scheme.

val register : elt -> id

Register a new item and get an ID. Note that registering the same item twice will get two different IDs.

val retrieve : id -> elt

Retrieve the item associated with the ID.

val export : unit -> elt Stdlib.Seq.t

Export the internal storage for serialization. Once exported, the representation is persistent and can be traversed without the effect handler.

val run : ?init:elt Stdlib.Seq.t -> (unit -> 'a) -> 'a

run t runs the thunk t and handles the effects for generating unique IDs.

  • parameter init

    The initial storage, which should be the output of some previous export.