package containers

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Transient Identifiers

type t

Identifiers for transient modifications. A transient modification is uniquely identified by a Transient.t. Once Transient.freeze r is called, r cannot be used to modify the structure again.

val create : unit -> t

Create a new, active ID.

val equal : t -> t -> bool

Equality between IDs.

val frozen : t -> bool

frozen i returns true if freeze i was called before. In this case, the ID cannot be used for modifications again.

val active : t -> bool

active i is not (frozen i).

val freeze : t -> unit

freeze i makes i unusable for new modifications. The values created with i will now be immutable.

val with_ : (t -> 'a) -> 'a

with_ f creates a transient ID i, calls f i, freezes the ID i and returns the result of f i.

exception Frozen

Raised when a frozen ID is used.

OCaml

Innovation. Community. Security.