@@ -176,7 +176,7 @@ data Params r
176176 ( Eq , Ord , Generic , Generic1
177177 , Typeable , Data , NFData , NFData1 , Serialise , Binary , ToJSON , ToJSON1 , FromJSON , FromJSON1
178178 , Functor , Foldable , Traversable
179- , Show , Hashable , Hashable1
179+ , Show , Hashable
180180 )
181181
182182instance IsString (Params r ) where
@@ -187,6 +187,8 @@ $(deriveRead1 ''Params)
187187$ (deriveEq1 ''Params)
188188$ (deriveOrd1 ''Params)
189189
190+ deriving instance Hashable1 Params
191+
190192-- *** lens traversals
191193
192194$ (makeTraversals ''Params)
@@ -212,14 +214,9 @@ data Antiquoted (v :: Type) (r :: Type)
212214 , Typeable , Data , NFData , NFData1 , Serialise , Binary
213215 , ToJSON , ToJSON1 , FromJSON , FromJSON1
214216 , Functor , Foldable , Traversable
215- , Show , Read , Hashable , Hashable1
217+ , Show , Read , Hashable
216218 )
217219
218- instance Hashable2 Antiquoted where
219- liftHashWithSalt2 ha _ salt (Plain a) = ha (salt `hashWithSalt` (0 :: Int )) a
220- liftHashWithSalt2 _ _ salt EscapedNewline = salt `hashWithSalt` (1 :: Int )
221- liftHashWithSalt2 _ hb salt (Antiquoted b) = hb (salt `hashWithSalt` (2 :: Int )) b
222-
223220$ (deriveShow1 ''Antiquoted)
224221$ (deriveShow2 ''Antiquoted)
225222$ (deriveRead1 ''Antiquoted)
@@ -230,6 +227,12 @@ $(deriveOrd1 ''Antiquoted)
230227$ (deriveOrd2 ''Antiquoted)
231228$ (deriveJSON2 defaultOptions ''Antiquoted)
232229
230+ instance Hashable2 Antiquoted where
231+ liftHashWithSalt2 ha _ salt (Plain a) = ha (salt `hashWithSalt` (0 :: Int )) a
232+ liftHashWithSalt2 _ _ salt EscapedNewline = salt `hashWithSalt` (1 :: Int )
233+ liftHashWithSalt2 _ hb salt (Antiquoted b) = hb (salt `hashWithSalt` (2 :: Int )) b
234+
235+ deriving instance (Hashable v ) => Hashable1 (Antiquoted (v :: Type ))
233236
234237-- *** lens traversals
235238
@@ -263,7 +266,7 @@ data NString r
263266 ( Eq , Ord , Generic , Generic1
264267 , Typeable , Data , NFData , NFData1 , Serialise , Binary , ToJSON , ToJSON1 , FromJSON , FromJSON1
265268 , Functor , Foldable , Traversable
266- , Show , Read , Hashable , Hashable1
269+ , Show , Read , Hashable
267270 )
268271
269272-- | For the the 'IsString' instance, we use a plain doublequoted string.
@@ -276,6 +279,8 @@ $(deriveRead1 ''NString)
276279$ (deriveEq1 ''NString)
277280$ (deriveOrd1 ''NString)
278281
282+ deriving instance Hashable1 NString
283+
279284-- *** lens traversals
280285
281286$ (makeTraversals ''NString)
@@ -423,14 +428,16 @@ data Binding r
423428 ( Eq , Ord , Generic , Generic1
424429 , Typeable , Data , NFData , NFData1 , Serialise , Binary , ToJSON , FromJSON
425430 , Functor , Foldable , Traversable
426- , Show , Hashable , Hashable1
431+ , Show , Hashable
427432 )
428433
429434$ (deriveShow1 ''Binding)
430435$ (deriveEq1 ''Binding)
431436$ (deriveOrd1 ''Binding)
432437-- x $(deriveJSON1 defaultOptions ''Binding)
433438
439+ deriving instance Hashable1 Binding
440+
434441-- *** lens traversals
435442
436443$ (makeTraversals ''Binding)
@@ -596,7 +603,7 @@ data NExprF r
596603 ( Eq , Ord , Generic , Generic1
597604 , Typeable , Data , NFData , NFData1 , Serialise , Binary , ToJSON , FromJSON
598605 , Functor , Foldable , Traversable
599- , Show , Hashable , Hashable1
606+ , Show , Hashable
600607 )
601608
602609
@@ -605,6 +612,8 @@ $(deriveEq1 ''NExprF)
605612$ (deriveOrd1 ''NExprF)
606613-- x $(deriveJSON1 defaultOptions ''NExprF)
607614
615+ deriving instance Hashable1 NExprF
616+
608617-- ** lens traversals
609618
610619$ (makeTraversals ''NExprF)
0 commit comments