Module Diff2

An implementation of Eugene Myers' O(ND) Difference Algorithm[1]. This implementation is a port of util.lcs module of Gauche Scheme interpreter.

type 'a common = [
| `Common of int * int * 'a

an element of lcs of seq1 and seq2

type 'a edit = [
| `Removed of int * 'a
| `Added of int * 'a
| 'a common

an element of diff of seq1 and seq2.

module type SeqType = sig ... end

Input signature of Diff.Make.

module type S = sig ... end

Output signature of Diff.Make.

module Make : functor (M : SeqType) -> S with type t = M.t and type elem = M.elem

Functor building an implementation of the diff structure given a sequence type.