Module Ocsipersist_lib

This modules provides tools for creating more implementations of the Ocsipersist virtual module.

module Sigs : sig ... end
exception Decoding_error of string

Raised by the JSON frontends when a value read from the backend cannot be deserialised by the codec it was opened with (the type changed, or the stored data is corrupted). The argument is the decoder's error message.

val decode_json : 'a Deriving_Json.t -> string -> 'a

Decode a JSON value stored in a backend, turning the decoder's Failure into Decoding_error so that callers can distinguish an unreadable value from a backend error.

val is_valid_name_char : char -> bool
val validate_name : string -> unit

deriving polymorphic interface from the functorial one

module Variable (T : sig ... end) : sig ... end
module Ref (Store : Sigs.STORE) : sig ... end

Type-safe persistent references using Deriving_Json for serialisation.