Module Irmin.Contents

Contents specifies how user-defined contents need to be serializable and mergeable.

The user needs to provide:

Default implementations for idempotent string and JSON contents are provided.

Values.

module type S = sig ... end
module String : S with type t = string

Contents of type string, with the default 3-way merge strategy: assume that update operations are idempotent and conflict iff values are modified concurrently.

type json = [
| `Null
| `Bool of bool
| `String of string
| `Float of float
| `O of (string * json) list
| `A of json list
]
module Json : S with type t = (string * json) list

Json contents are associations from strings to json values stored as JSON encoded strings. If the same JSON key has been modified concurrently with different values then the merge function conflicts.

module Json_value : S with type t = json

Json_value allows any kind of json value to be stored, not only objects.

module V1 : sig ... end
module type STORE = sig ... end

Contents store.

module Store (C : sig ... end) : STORE with type 'a t = 'a C.t and type key = C.key and type value = C.value

Store creates a contents store.