Module Ocsipersist.Ref
Simple interface for persistent references. Relies on Stdlib.Marshal for (de)serialisation, which entails the same limitations as for the Polymorphic frontend. If this is an issue you can rely on Functorial frontend instead (see TABLE.Variable).
Persistent references for OCaml
type 'a tThe type of (persistent or not) references
val ref : ?persistent:string -> 'a -> 'a tref ?persistent default creates a reference. If optional parameter ?persistent is absent,
- the reference will not be persistent (implemented using OCaml references).
- Otherwise, the value of
persistentwill be used as key for the - value in the persistent reference table. If the reference already exists, the current value is kept.
- Be careful to change this name every time you change the type of the
- value.