1
1
mirror of https://github.com/github/semantic.git synced 2025-01-08 16:39:47 +03:00

Add a type annotation for safeRange.

This commit is contained in:
Rob Rix 2016-03-02 18:50:27 -05:00
parent 4fe82ec41b
commit 49b6984d49

View File

@ -110,6 +110,7 @@ splitAnnotatedByLines sources ranges categories syntax = case syntax of
makeRanges a b = runBothWith safeRange <$> sequenceA (both a b)
-- | Constructs a Range such that its end is clamped to its start.
safeRange :: Int -> Int -> Range
safeRange start end = Range start (max start end)
-- | Produces the starting indices of a diff.