1
1
mirror of https://github.com/github/semantic.git synced 2024-12-29 18:06:14 +03:00
This commit is contained in:
Rob Rix 2016-05-17 15:57:18 -04:00
parent 0b45e06c91
commit eeab8580ff

View File

@ -50,7 +50,7 @@ maybeLastIndex (Range _ end) = Just $ end - 1
-- | Test two ranges for intersection.
intersectsRange :: Range -> Range -> Bool
intersectsRange range1 range2 = isWellFormedAndNonEmpty $ intersectionRange range1 range2
where isWellFormedAndNonEmpty range = start range > end range
where isWellFormedAndNonEmpty range = start range < end range
-- Return the (possibly empty, possibly ill-formed) intersection of two ranges.
intersectionRange :: Range -> Range -> Range