package coq-core
Install
Dune Dependency
Authors
Maintainers
Sources
md5=5d1187d5e44ed0163f76fb12dabf012e
sha512=91bc81530fa4f6498961583ad51eac5001f139881788b88e360a866ad8e2a6e2c5bce86d1a580ab4cd4782bf49d48318767df82471ce33ba3ac143e5569ad33c
doc/coq-core.clib/Diff2/Make/index.html
Module Diff2.Make
Source
Functor building an implementation of the diff structure given a sequence type.
Parameters
Signature
lcs ~equal seq1 seq2
computes the LCS (longest common sequence) of seq1
and seq2
. Elements of seq1
and seq2
are compared with equal
. equal
defaults to Pervasives.(=)
.
Elements of lcs are `Common (pos1, pos2, e)
where e
is an element, pos1
is a position in seq1
, and pos2
is a position in seq2
.
diff ~equal seq1 seq2
computes the diff of seq1
and seq2
. Elements of seq1
and seq2
are compared with equal
.
Elements only in seq1
are represented as `Removed (pos, e)
where e
is an element, and pos
is a position in seq1
; those only in seq2
are represented as `Added (pos, e)
where e
is an element, and pos
is a position in seq2
; those common in seq1
and seq2
are represented as `Common (pos1, pos2, e)
where e
is an element, pos1
is a position in seq1
, and pos2
is a position in seq2
.