sig
module type Vector =
sig
type atom
type t
val length : Mergeable_vector.Vector.t -> int
val set :
Mergeable_vector.Vector.t ->
int -> Mergeable_vector.Vector.atom -> Mergeable_vector.Vector.t
val get :
Mergeable_vector.Vector.t -> int -> Mergeable_vector.Vector.atom
val insert :
Mergeable_vector.Vector.t ->
int -> Mergeable_vector.Vector.atom -> Mergeable_vector.Vector.t
val delete :
Mergeable_vector.Vector.t -> int -> Mergeable_vector.Vector.t
end
module type Mergeable_vector =
sig
type atom
type t
val length : t -> int
val set : t -> int -> atom -> t
val get : t -> int -> atom
val insert : t -> int -> atom -> t
val delete : t -> int -> t
type patch
val diff : t -> t -> Mergeable_vector.Mergeable_vector.patch
val apply : t -> Mergeable_vector.Mergeable_vector.patch -> t
val merge : resolve:(atom -> atom -> atom) -> ancestor:t -> t -> t -> t
end
module Make :
functor (V : Vector) ->
sig
type atom = V.atom
type t = V.t
val length : t -> int
val set : t -> int -> atom -> t
val get : t -> int -> atom
val insert : t -> int -> atom -> t
val delete : t -> int -> t
type patch
val diff : t -> t -> patch
val apply : t -> patch -> t
val merge :
resolve:(atom -> atom -> atom) -> ancestor:t -> t -> t -> t
end
module String :
sig
type atom = char
type t = string
val length : t -> int
val set : t -> int -> atom -> t
val get : t -> int -> atom
val insert : t -> int -> atom -> t
val delete : t -> int -> t
type patch
val diff : t -> t -> patch
val apply : t -> patch -> t
val merge : resolve:(atom -> atom -> atom) -> ancestor:t -> t -> t -> t
end
end