mirror of
https://github.com/github/semantic.git
synced 2024-12-27 08:54:14 +03:00
Filter the list of children in lineAndRemainingWhere
.
This commit is contained in:
parent
561f790b12
commit
b6fcf7c3aa
@ -161,7 +161,7 @@ alignBranch getRange children ranges = case intersectingChildren of
|
|||||||
(leftRange, rightRange) = splitThese headRanges
|
(leftRange, rightRange) = splitThese headRanges
|
||||||
lineAndRemaining children ranges = let (intersections, remaining) = alignChildren getRange children ranges in
|
lineAndRemaining children ranges = let (intersections, remaining) = alignChildren getRange children ranges in
|
||||||
(fromJust ((,) <$> ranges `applyThese` Join (runBothWith These intersections)), remaining)
|
(fromJust ((,) <$> ranges `applyThese` Join (runBothWith These intersections)), remaining)
|
||||||
lineAndRemainingWhere predicate children = if any predicate children then Just . lineAndRemaining children else const Nothing
|
lineAndRemainingWhere predicate children = if any predicate children then Just . lineAndRemaining (filter predicate children) else const Nothing
|
||||||
advancePast children = fromThese id id . runJoin . (drop 1 <$) $ unionThese (head . copoint <$> children)
|
advancePast children = fromThese id id . runJoin . (drop 1 <$) $ unionThese (head . copoint <$> children)
|
||||||
|
|
||||||
-- | Given a list of aligned children, produce lists of their intersecting first lines, and a list of the remaining lines/nonintersecting first lines.
|
-- | Given a list of aligned children, produce lists of their intersecting first lines, and a list of the remaining lines/nonintersecting first lines.
|
||||||
|
Loading…
Reference in New Issue
Block a user