OCaml compiler library : Diffing_with_keys

`sig
type 'a with_pos = { pos : int; data : 'a; }
val with_pos : 'a list -> 'a Diffing_with_keys.with_pos list
type ('l, 'r, 'diff) mismatch =
Name of { pos : int; got : string; expected : string;
types_match : bool;
}
| Type of { pos : int; got : 'l; expected : 'r; reason : 'diff; }
type ('l, 'r, 'diff) change =
Change of ('l, 'r, 'diff) Diffing_with_keys.mismatch
| Swap of { pos : int * int; first : string; last : string; }
| Move of { name : string; got : int; expected : int; }
| Insert of { pos : int; insert : 'r; }
| Delete of { pos : int; delete : 'l; }
val prefix : ('l, 'r, 'diff) Diffing_with_keys.change Format_doc.printer
module Define :
(D : sig type left type right type diff type state end) ->
sig
type diff = (D.left, D.right, D.diff) Diffing_with_keys.mismatch
type left = D.left Diffing_with_keys.with_pos
type right = D.right Diffing_with_keys.with_pos
type composite_change =
(D.left, D.right, D.diff) Diffing_with_keys.change
type patch = Diffing_with_keys.Define.composite_change list
type change =
(Diffing_with_keys.Define.left, Diffing_with_keys.Define.right,
unit, Diffing_with_keys.Define.diff)
Diffing.change
module type Parameters =
sig
val weight : Diffing_with_keys.Define.change -> int
val test :
D.state ->
Diffing_with_keys.Define.left ->
Diffing_with_keys.Define.right ->
(unit, Diffing_with_keys.Define.diff) Stdlib.result
val update :
Diffing_with_keys.Define.change -> D.state -> D.state
val key_left : D.left -> string
val key_right : D.right -> string
end
module Simple :
Parameters ->
sig
val diff :
D.state ->
D.left list -> D.right list -> Diffing_with_keys.Define.patch
end
end
end`