Module Patience_diff.Range

module Range: sig .. end
For handling diffs abstractly. A range is a subarray of the two original arrays with a constructor defining its relationship to the two original arrays. A Same range contains a series of elements which can be found in both arrays. A New range contains elements found only in the new array, while an Old range contains elements found only in the old array.

A Replace contains two arrays: elements in the first array are elements found only in the original, old array which have been replaced by elements in the second array, which are elements found only in the new array.


type 'a t = 
| Same of ('a * 'a) array
| Old of 'a array
| New of 'a array
| Replace of 'a array * 'a array
| Unified of 'a array