diff --git a/src/Range.hs b/src/Range.hs index 8b5408a84..77f58569f 100644 --- a/src/Range.hs +++ b/src/Range.hs @@ -11,6 +11,10 @@ import Data.Option data Range = Range { start :: !Int, end :: !Int } deriving (Eq, Show) +-- | Make a range at a given index. +rangeAt :: Int -> Range +rangeAt a = Range a a + -- | Return the length of the range. rangeLength :: Range -> Int rangeLength range = end range - start range