From 738ef09bf9add0f0f21d7a72dd5ce31dbd200f67 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Mon, 14 May 2018 13:19:15 -0700 Subject: [PATCH] Make NUnaryOp and NBinaryOp both Enum and Bounded --- src/Nix/Expr/Types.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Nix/Expr/Types.hs b/src/Nix/Expr/Types.hs index 305e2fd..3ebca40 100644 --- a/src/Nix/Expr/Types.hs +++ b/src/Nix/Expr/Types.hs @@ -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