Module type Mergeable_vector.Mergeable_vector

module type Mergeable_vector = sig .. end


Mergeable-vector


include Mergeable_vector.Vector
type patch 
The type of patch.
val diff : t -> t -> patch
diff a b returns a patch p such that apply a p = b. The difference is computed by Wagner-Fischer algorithm. O(length(a) * length(b)) time and space.
val apply : t -> patch -> t
apply a p applies the compatibe patch p on a.

Raise Invalid_argument "incompatible patch" if the patch cannot be applied.

val merge : resolve:(atom -> atom -> atom) -> ancestor:t -> t -> t -> t
merge r a l r performs a 3-way merge between two vectors l and r, and their common ancestor a. Merge conflicts are handled by the resolve function.