package ocsipersist-lib

  1. Overview
  2. Docs

Module type Sigs.REFSource

Persistent references for OCaml

Sourcetype 'a t

The type of (persistent or not) references

Sourceval ref : ?persistent:string -> 'a -> 'a t

ref ?persistent default creates a reference. If optional parameter ?persistent is absent,

  1. the reference will not be persistent (implemented using OCaml references).
  2. Otherwise, the value of persistent will be used as key for the
  3. value in the persistent reference table. If the reference already exists, the current value is kept.
  4. Be careful to change this name every time you change the type of the
  5. value.
Sourceval get : 'a t -> 'a Lwt.t

Get the value of a reference

Sourceval set : 'a t -> 'a -> unit Lwt.t

Set the value of a reference

OCaml

Innovation. Community. Security.