Skip to content

Drop support for hashable < 1.2.5 #355

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions Data/HashMap/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,7 @@ import qualified GHC.Exts as Exts
import Data.Functor.Classes
import GHC.Stack

#if MIN_VERSION_hashable(1,2,5)
import qualified Data.Hashable.Lifted as H
#endif

import qualified Control.DeepSeq as NF

Expand Down Expand Up @@ -486,7 +484,6 @@ equalKeys = go

leafEq (L k1 _) (L k2 _) = k1 == k2

#if MIN_VERSION_hashable(1,2,5)
instance H.Hashable2 HashMap where
liftHashWithSalt2 hk hv salt hm = go salt (toList' hm [])
where
Expand All @@ -512,7 +509,6 @@ instance H.Hashable2 HashMap where

instance (Hashable k) => H.Hashable1 (HashMap k) where
liftHashWithSalt = H.liftHashWithSalt2 H.hashWithSalt
#endif

instance (Hashable k, Hashable v) => Hashable (HashMap k v) where
hashWithSalt salt hm = go salt hm
Expand Down
4 changes: 0 additions & 4 deletions Data/HashSet/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,7 @@ import qualified Data.HashMap.Internal as H
import qualified Data.List as List
import Text.Read

#if MIN_VERSION_hashable(1,2,5)
import qualified Data.Hashable.Lifted as H
#endif

import qualified Control.DeepSeq as NF
import qualified Language.Haskell.TH.Syntax as TH
Expand Down Expand Up @@ -241,10 +239,8 @@ instance (Data a, Eq a, Hashable a) => Data (HashSet a) where
dataTypeOf _ = hashSetDataType
dataCast1 f = gcast1 f

#if MIN_VERSION_hashable(1,2,6)
instance H.Hashable1 HashSet where
liftHashWithSalt h s = H.liftHashWithSalt2 h hashWithSalt s . asMap
#endif

instance (Hashable a) => Hashable (HashSet a) where
hashWithSalt salt = hashWithSalt salt . asMap
Expand Down
8 changes: 4 additions & 4 deletions unordered-containers.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ library
build-depends:
base >= 4.10 && < 5,
deepseq >= 1.4.3,
hashable >= 1.0.1.1 && < 1.5,
hashable >= 1.2.5 && < 1.5,
template-haskell < 2.19

default-language: Haskell2010
Expand Down Expand Up @@ -89,7 +89,7 @@ test-suite unordered-containers-tests
base,
ChasingBottoms,
containers >= 0.5.8,
hashable >= 1.0.1.1,
hashable,
HUnit,
QuickCheck >= 2.4.0.1,
random,
Expand All @@ -116,8 +116,8 @@ benchmark benchmarks
base >= 4.8.0,
bytestring >= 0.10.0.0,
containers,
deepseq >= 1.4,
hashable >= 1.0.1.1,
deepseq,
hashable,
hashmap,
mtl,
random,
Expand Down