Skip to content

Commit

Permalink
Fix #1472 by depending on hashable-1.3.4.0 or later
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
RyanGlScott committed Oct 11, 2021
1 parent 0b04099 commit 41ad613
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 10 deletions.
4 changes: 2 additions & 2 deletions cabal.GHC-8.10.3.config
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions cabal.GHC-8.10.4.config
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions cabal.GHC-8.8.4.config
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion saw-core/saw-core.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 0 additions & 3 deletions saw-core/src/Verifier/SAW/Term/Functor.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 41ad613

Please sign in to comment.