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:
parent
507595eed5
commit
a56219d4d8
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user