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

🔥 the bogus context gathering guards.

This commit is contained in:
Rob Rix 2016-03-28 16:03:43 -04:00
parent deff4e0c28
commit 3c27e69000

View File

@ -137,15 +137,6 @@ groupChildrenByLine ranges children = go (fromThese [] [] $ runJoin ranges) (joi
, (lines, rest) <- span (and . bimapJoin ((<= end l) . end . getRange) ((<= end r) . end . getRange)) children
, not $ null lines
= Join (uncurry These $ bimap ((,) l . catMaybes) ((,) r . catMaybes) (unalign $ runJoin <$> lines)) : go (ls, rs) rest
| (l:ls, r:rs) <- ranges
, not $ null children
= Join (These (l, []) (r, [])) : go (ls, rs) children
| (l:ls, rs) <- ranges
, not $ null children
= Join (This (l, [])) : go (ls, rs) children
| (ls, r:rs) <- ranges
, not $ null children
= Join (That (r, [])) : go (ls, rs) children
| otherwise = uncurry (alignWith (fmap (flip (,) []) . Join)) ranges
getRange (Free (Annotated (Info range _) _)) = range
getRange (Pure patch) | Info range _ :< _ <- getSplitTerm patch = range