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

Derive some Typeable instances.

This commit is contained in:
Rob Rix 2016-07-21 17:17:35 -04:00
parent 864e8a4539
commit 2ed1c4152d
4 changed files with 4 additions and 3 deletions

View File

@ -30,7 +30,7 @@ data Category
| ArrayLiteral
-- | A non-standard category, which can be used for comparability.
| Other String
deriving (Eq, Generic, Ord, Show)
deriving (Eq, Generic, Ord, Show, Typeable)
-- Instances

View File

@ -11,6 +11,7 @@ import Test.QuickCheck
data Record :: [*] -> * where
RNil :: Record '[]
RCons :: h -> Record t -> Record (h ': t)
deriving Typeable
infixr 0 .:

View File

@ -8,7 +8,7 @@ import Range
import Test.QuickCheck
newtype Cost = Cost { unCost :: Integer }
deriving (Eq, Num, Ord, Show)
deriving (Eq, Num, Ord, Show, Typeable)
characterRange :: HasField fields Range => Record fields -> Range
characterRange = getField

View File

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