1
1
mirror of https://github.com/github/semantic.git synced 2025-01-03 13:02:37 +03:00

🔥 redundant parens.

This commit is contained in:
Rob Rix 2016-03-31 15:38:38 -04:00
parent dea54b6790
commit 293d27d123

View File

@ -143,11 +143,11 @@ group2 ranges child | Just (headRanges, tailRanges) <- unconsThese ranges
, (first:rest) <- child
= case fromThese False False . runJoin $ intersects headRanges child of
(True, True) -> let (moreRanges, restOfChild) = group2 tailRanges rest in
(moreRanges, (pairRangeWithLine headRanges first) : restOfChild)
(moreRanges, pairRangeWithLine headRanges first : restOfChild)
(True, False) -> let (moreRanges, restOfChild) = group2 (atLeft ranges) rest in
(moreRanges, (pairRangeWithLine headRanges first) : restOfChild)
(moreRanges, pairRangeWithLine headRanges first : restOfChild)
(False, True) -> let (moreRanges, restOfChild) = group2 (atRight ranges) rest in
(moreRanges, (pairRangeWithLine headRanges first) : restOfChild)
(moreRanges, pairRangeWithLine headRanges first : restOfChild)
_ -> (tailRanges, [ flip (,) [] <$> headRanges ])
| otherwise = (ranges, [])
where atLeft (Join (These (_:as) bs)) = Join (These as bs)