Module type Diff2.S
Output signature of Diff.Make.
- val lcs : ?equal:(elem -> elem -> bool) -> t -> t -> elem common list
- lcs ~equal seq1 seq2computes the LCS (longest common sequence) of- seq1and- seq2. Elements of- seq1and- seq2are compared with- equal.- equaldefaults to- Pervasives.(=).- Elements of lcs are - `Common (pos1, pos2, e)where- eis an element,- pos1is a position in- seq1, and- pos2is a position in- seq2.
- val diff : ?equal:(elem -> elem -> bool) -> t -> t -> elem edit list
- diff ~equal seq1 seq2computes the diff of- seq1and- seq2. Elements of- seq1and- seq2are compared with- equal.- Elements only in - seq1are represented as- `Removed (pos, e)where- eis an element, and- posis a position in- seq1; those only in- seq2are represented as- `Added (pos, e)where- eis an element, and- posis a position in- seq2; those common in- seq1and- seq2are represented as- `Common (pos1, pos2, e)where- eis an element,- pos1is a position in- seq1, and- pos2is a position in- seq2.