From 41ad6137c5a88ee9ce716bb9bdc1b02e3911d903 Mon Sep 17 00:00:00 2001 From: Ryan Scott Date: Mon, 11 Oct 2021 10:06:07 -0400 Subject: [PATCH] Fix #1472 by depending on hashable-1.3.4.0 or later Issue #1472 is caused by `saw-core` defining an orphan `Hashable` instance for `Map` that clashes with an instance introduced in `hashable-1.3.4.0`. To fix the issue, simply depend on `hashable-1.3.4.0` or later to ensure that the instance is always available, which allows removing the orphan instance entirely. Fixes #1472. --- cabal.GHC-8.10.3.config | 4 ++-- cabal.GHC-8.10.4.config | 4 ++-- cabal.GHC-8.8.4.config | 4 ++-- saw-core/saw-core.cabal | 2 +- saw-core/src/Verifier/SAW/Term/Functor.hs | 3 --- 5 files changed, 7 insertions(+), 10 deletions(-) diff --git a/cabal.GHC-8.10.3.config b/cabal.GHC-8.10.3.config index a7ff52aff6..4dcb82d68c 100644 --- a/cabal.GHC-8.10.3.config +++ b/cabal.GHC-8.10.3.config @@ -145,8 +145,8 @@ constraints: any.Cabal ==3.2.1.0, any.ghci ==8.10.3, any.gitrev ==1.3.1, any.happy ==1.20.0, - any.hashable ==1.3.1.0, - hashable +integer-gmp, + any.hashable ==1.3.4.1, + hashable +integer-gmp -random-initial-seed, any.hashtables ==1.2.4.1, hashtables -bounds-checking -debug -detailed-profiling -portable -sse42 +unsafe-tricks, any.haskeline ==0.8.0.1, diff --git a/cabal.GHC-8.10.4.config b/cabal.GHC-8.10.4.config index 3b26b14a4d..bcde304b2e 100644 --- a/cabal.GHC-8.10.4.config +++ b/cabal.GHC-8.10.4.config @@ -149,8 +149,8 @@ constraints: any.Cabal ==3.2.1.0, any.ghci ==8.10.4, any.gitrev ==1.3.1, any.happy ==1.20.0, - any.hashable ==1.3.1.0, - hashable +integer-gmp, + any.hashable ==1.3.4.1, + hashable +integer-gmp -random-initial-seed, any.hashtables ==1.2.4.1, hashtables -bounds-checking -debug -detailed-profiling -portable -sse42 +unsafe-tricks, any.haskeline ==0.8.0.1, diff --git a/cabal.GHC-8.8.4.config b/cabal.GHC-8.8.4.config index 8853f20b5e..f8f48bdbaf 100644 --- a/cabal.GHC-8.8.4.config +++ b/cabal.GHC-8.8.4.config @@ -146,8 +146,8 @@ constraints: any.Cabal ==3.0.1.0, any.ghci ==8.8.4, any.gitrev ==1.3.1, any.happy ==1.20.0, - any.hashable ==1.3.1.0, - hashable -examples +integer-gmp +sse2 -sse41, + any.hashable ==1.3.4.1, + hashable +integer-gmp -random-initial-seed, any.hashtables ==1.2.4.1, hashtables -bounds-checking -debug -detailed-profiling -portable -sse42 +unsafe-tricks, any.haskeline ==0.7.5.0, diff --git a/saw-core/saw-core.cabal b/saw-core/saw-core.cabal index aec0cc1bf2..6775dc328b 100644 --- a/saw-core/saw-core.cabal +++ b/saw-core/saw-core.cabal @@ -32,7 +32,7 @@ library data-ref, directory, filepath, - hashable >= 1.2, + hashable >= 1.3.4, lens >= 3.8, modern-uri >= 0.3.2 && < 0.4, MonadRandom, diff --git a/saw-core/src/Verifier/SAW/Term/Functor.hs b/saw-core/src/Verifier/SAW/Term/Functor.hs index 7d6361f9f7..29d4f26de6 100644 --- a/saw-core/src/Verifier/SAW/Term/Functor.hs +++ b/saw-core/src/Verifier/SAW/Term/Functor.hs @@ -88,9 +88,6 @@ type DeBruijnIndex = Int type FieldName = Text type LocalName = Text -instance (Hashable k, Hashable a) => Hashable (Map k a) where - hashWithSalt x m = hashWithSalt x (Map.assocs m) - instance Hashable a => Hashable (Vector a) where hashWithSalt x v = hashWithSalt x (V.toList v)