@@ -43,9 +43,7 @@ import Data.Eq.Deriving
4343import Data.Fix
4444import Data.Functor.Classes
4545import Data.Hashable
46- #if MIN_VERSION_hashable(1, 2, 5)
4746import Data.Hashable.Lifted
48- #endif
4947import Data.List ( inits
5048 , tails
5149 )
@@ -77,9 +75,7 @@ hashAt :: VarName -> Lens' (AttrSet v) (Maybe v)
7775hashAt = flip alterF
7876
7977-- unfortunate orphans
80- #if MIN_VERSION_hashable(1, 2, 5)
8178instance Hashable1 NonEmpty
82- #endif
8379
8480#if !MIN_VERSION_binary(0, 8, 4)
8581instance Binary a => Binary (NE. NonEmpty a ) where
@@ -135,9 +131,7 @@ data NExprF r
135131 deriving (Ord , Eq , Generic , Generic1 , Typeable , Data , Functor ,
136132 Foldable , Traversable , Show , NFData , Hashable )
137133
138- #if MIN_VERSION_hashable(1, 2, 5)
139134instance Hashable1 NExprF
140- #endif
141135
142136#if MIN_VERSION_deepseq(1, 4, 3)
143137instance NFData1 NExprF
@@ -178,9 +172,7 @@ data Binding r
178172 deriving (Generic , Generic1 , Typeable , Data , Ord , Eq , Functor ,
179173 Foldable , Traversable , Show , NFData , Hashable )
180174
181- #if MIN_VERSION_hashable(1, 2, 5)
182175instance Hashable1 Binding
183- #endif
184176
185177#if MIN_VERSION_deepseq(1, 4, 3)
186178instance NFData1 Binding
@@ -202,9 +194,7 @@ data Params r
202194 deriving (Ord , Eq , Generic , Generic1 , Typeable , Data , Functor , Show ,
203195 Foldable , Traversable , NFData , Hashable )
204196
205- #if MIN_VERSION_hashable(1, 2, 5)
206197instance Hashable1 Params
207- #endif
208198
209199#if MIN_VERSION_deepseq(1, 4, 3)
210200instance NFData1 Params
@@ -227,15 +217,13 @@ data Antiquoted (v :: *) (r :: *) = Plain !v | EscapedNewline | Antiquoted !r
227217 deriving (Ord , Eq , Generic , Generic1 , Typeable , Data , Functor , Foldable ,
228218 Traversable , Show , Read , NFData , Hashable )
229219
230- #if MIN_VERSION_hashable(1, 2, 5)
231220instance Hashable v => Hashable1 (Antiquoted v )
232221
233222instance Hashable2 Antiquoted where
234223 liftHashWithSalt2 ha _ salt (Plain a) = ha (salt `hashWithSalt` (0 :: Int )) a
235224 liftHashWithSalt2 _ _ salt EscapedNewline = salt `hashWithSalt` (1 :: Int )
236225 liftHashWithSalt2 _ hb salt (Antiquoted b) =
237226 hb (salt `hashWithSalt` (2 :: Int )) b
238- #endif
239227
240228#if MIN_VERSION_deepseq(1, 4, 3)
241229instance NFData v => NFData1 (Antiquoted v )
@@ -259,9 +247,7 @@ data NString r
259247 deriving (Eq , Ord , Generic , Generic1 , Typeable , Data , Functor , Foldable ,
260248 Traversable , Show , Read , NFData , Hashable )
261249
262- #if MIN_VERSION_hashable(1, 2, 5)
263250instance Hashable1 NString
264- #endif
265251
266252#if MIN_VERSION_deepseq(1, 4, 3)
267253instance NFData1 NString
@@ -341,13 +327,11 @@ instance Eq1 NKeyName where
341327 liftEq _ (StaticKey a) (StaticKey b) = a == b
342328 liftEq _ _ _ = False
343329
344- #if MIN_VERSION_hashable(1, 2, 5)
345330instance Hashable1 NKeyName where
346331 liftHashWithSalt h salt (DynamicKey a) =
347332 liftHashWithSalt2 (liftHashWithSalt h) h (salt `hashWithSalt` (0 :: Int )) a
348333 liftHashWithSalt _ salt (StaticKey n) =
349334 salt `hashWithSalt` (1 :: Int ) `hashWithSalt` n
350- #endif
351335
352336-- Deriving this instance automatically is not possible because @r@
353337-- occurs not only as last argument in @Antiquoted (NString r) r@
0 commit comments