Compatibility with hashable-1.3.4 (#142)

The code has an orphan instance `Hashable (Map k v)` but, starting from [hashable-1.3.4.0](https://hackage.haskell.org/package/hashable-1.3.4.0/docs/Data-Hashable.html#t:Hashable), that instance already exists in hashable itself, making compilation fail.

I disabled it for that case using a CPP directive.
This commit is contained in:
Daniel Díaz Carrete 2021-10-02 17:34:38 +02:00 committed by GitHub
parent 5161cfc360
commit 4d3f3aa12a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 4 deletions

View File

@ -57,8 +57,6 @@ type Priority = Int
-- Some orphan instances we need to be able to derive a Hashable
-- instance for Display
instance (Hashable k, Hashable v) => Hashable (Map k v) where
hashWithSalt = hashUsing M.assocs
instance Hashable AttrName
-- | A record explaining how to display an entity in the TUI.

View File

@ -2,6 +2,7 @@ resolver: lts-18.12
extra-deps:
- brick-0.64
- word-wrap-0.5
- hashable-1.3.4.0
- git: https://github.com/colinhect/hsnoise
commit: 4ccff11dea7e8d94e6a5fcaf8f43857bd65bd72d
# get latest th-extras for ghc-9.0.1 compat

View File

@ -95,7 +95,7 @@ library
containers >= 0.6.2 && < 0.7,
directory >= 1.3 && < 1.4,
either >= 5.0 && < 5.1,
hashable >= 1.3 && < 1.4,
hashable >= 1.3.4 && < 1.4,
megaparsec >= 9.0 && < 9.2,
hsnoise >= 0.0.2 && < 0.1,
lens >= 4.19 && < 5.1,
@ -167,4 +167,4 @@ benchmark benchmark
swarm,
text
default-language: Haskell2010
ghc-options: -threaded
ghc-options: -threaded