mirror of
https://github.com/github/semantic.git
synced 2024-12-23 06:41:45 +03:00
Don’t iterate each line of each child.
This commit is contained in:
parent
6087ce0560
commit
0a1b3508ee
@ -134,8 +134,7 @@ groupChildrenByLine :: Join These [Range] -> [AlignedDiff leaf] -> [Join These (
|
||||
groupChildrenByLine ranges children = go rangeLists children
|
||||
where rangeLists = these (flip (,) []) ((,) []) (,) (runJoin ranges)
|
||||
go ranges children | (l:ls, r:rs) <- ranges
|
||||
, ((firstLine:restOfLines):rest) <- children = go ranges (restOfLines:rest)
|
||||
| ([]:rest) <- children = go ranges rest
|
||||
, (child:rest) <- children = go ranges rest
|
||||
| otherwise = uncurry (alignWith (fmap (flip (,) []) . Join)) ranges
|
||||
|
||||
intersects :: Range -> Range -> Bool
|
||||
|
Loading…
Reference in New Issue
Block a user