1
1
mirror of https://github.com/github/semantic.git synced 2024-12-23 06:41:45 +03:00

Write intersects in non-tacit style.

This commit is contained in:
Rob Rix 2016-03-28 16:19:08 -04:00
parent ed97e2fa36
commit 71fd74527d

View File

@ -139,7 +139,7 @@ groupChildrenByLine ranges children = go (fromThese [] [] $ runJoin ranges) (joi
| otherwise = uncurry (alignWith (fmap (flip (,) []) . Join)) ranges
getRange (Free (Annotated (Info range _) _)) = range
getRange (Pure patch) | Info range _ :< _ <- getSplitTerm patch = range
intersects range = (<= end range) . end . getRange
intersects range child = end (getRange child) <= end range
modifyJoin :: (p a a -> q b b) -> Join p a -> Join q b
modifyJoin f = Join . f . runJoin