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:
parent
4fe82ec41b
commit
49b6984d49
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user