Make NUnaryOp and NBinaryOp both Enum and Bounded

This commit is contained in:
John Wiegley 2018-05-14 13:19:15 -07:00
parent a660fbf1f8
commit 738ef09bf9
No known key found for this signature in database
GPG key ID: C144D8F4F19FE630

View file

@ -396,8 +396,8 @@ type NAttrPath r = NonEmpty (NKeyName r)
-- | There are two unary operations: logical not and integer negation.
data NUnaryOp = NNeg | NNot
deriving (Eq, Ord, Generic, Typeable, Data, Show, Read, NFData,
Hashable)
deriving (Eq, Ord, Enum, Bounded, Generic, Typeable, Data, Show, Read,
NFData, Hashable)
#ifdef MIN_VERSION_serialise
instance Serialise NUnaryOp
@ -421,8 +421,8 @@ data NBinaryOp
| NDiv -- ^ Division (/)
| NConcat -- ^ List concatenation (++)
| NApp -- ^ Apply a function to an argument.
deriving (Eq, Ord, Generic, Typeable, Data, Show, Read, NFData,
Hashable)
deriving (Eq, Ord, Enum, Bounded, Generic, Typeable, Data, Show, Read,
NFData, Hashable)
#ifdef MIN_VERSION_serialise
instance Serialise NBinaryOp