1
1
mirror of https://github.com/github/semantic.git synced 2024-12-22 14:21:31 +03:00

Add Generic instance to Range

This commit is contained in:
Rick Winfrey 2016-11-03 17:09:28 -05:00
parent d39d69436b
commit a817d950dd

View File

@ -10,7 +10,7 @@ import Test.QuickCheck
-- | A half-open interval of integers, defined by start & end indices. -- | A half-open interval of integers, defined by start & end indices.
data Range = Range { start :: Int, end :: Int } data Range = Range { start :: Int, end :: Int }
deriving (Eq, Show) deriving (Eq, Show, Generic)
-- | Make a range at a given index. -- | Make a range at a given index.
rangeAt :: Int -> Range rangeAt :: Int -> Range