1
1
mirror of https://github.com/github/semantic.git synced 2025-01-03 13:02:37 +03:00

Lazily bind the splitting of the first line of the child.

This commit is contained in:
Rob Rix 2016-03-31 17:13:22 -04:00
parent 507595eed5
commit a56219d4d8

View File

@ -142,6 +142,7 @@ group2 :: Join These [Range] -> [AlignedDiff leaf] -> (Join These [Range], [Alig
group2 ranges children | Just (headRanges, tailRanges) <- unconsThese ranges
, (child:restOfChildren) <- children
, (first:rest) <- child
, ~(l, r) <- split first
= case fromThese False False . runJoin $ intersects headRanges child of
(True, True) -> let (moreRanges, moreChildren, remainingLines) = group2 tailRanges (rest:restOfChildren) in
(moreRanges, moreChildren, pairRangeWithLine headRanges first : remainingLines)