1
1
mirror of https://github.com/github/semantic.git synced 2024-12-01 09:15:01 +03:00

Revert "Add a safeRange function."

This reverts commit 2e6a8abcfd604438f22b143f86a244bab19d694e.
This commit is contained in:
Rob Rix 2016-03-03 10:42:16 -05:00
parent e22210357d
commit 8445b988b4

View File

@ -109,9 +109,6 @@ splitAnnotatedByLines sources ranges categories syntax = case syntax of
makeRanges :: Both Int -> Both Int -> Both Range
makeRanges a b = runBothWith Range <$> sequenceA (both a b)
-- | Constructs a Range such that its end is clamped to its start.
safeRange start end = Range start (max start end)
-- | Produces the starting indices of a diff.
diffRanges :: Diff leaf Info -> Both (Maybe Range)
diffRanges (Free (Annotated infos _)) = Just . characterRange <$> infos