Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Patience_diff.RangeSourceFor 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 Next range contains elements found only in the second array, while an Prev range contains elements found only in the first array.
If a range is part of a move it will have a non-None Move_kind.t or Move_id.t in the case of Replace and Unified. A Prev with a Move _ Move_kind means that Prev has a corresponding Next that it was moved to. A Prev with a Within_move _ Move_kind means that this was some code that was deleted within a block that moved to a Next position of the file. If a Replace or Unified range is associated with a move it can only be change within a move so they only hove a Move_id.t option instead of a Move_kind.t option like Prev or Next.
A Replace contains two arrays: elements in the first output array are elements found only in the first input array, which have been replaced by elements in the second output array, which are elements found only in the second input array.
prev_only ranges drops all Next ranges and converts all Replace ranges to Prev ranges.
next_only ranges drops all Prev ranges and converts all Replace ranges to Next ranges.