Date: Saturday, December 24, 2022 @ 18:01:28 Author: felixonmars Revision: 1365421
remove old patch Deleted: haskell-parameterized-utils/trunk/hashable-1.4.patch --------------------+ hashable-1.4.patch | 114 --------------------------------------------------- 1 file changed, 114 deletions(-) Deleted: hashable-1.4.patch =================================================================== --- hashable-1.4.patch 2022-12-24 18:01:03 UTC (rev 1365420) +++ hashable-1.4.patch 2022-12-24 18:01:28 UTC (rev 1365421) @@ -1,114 +0,0 @@ -From 73ad4b0bb044decda71091a9f0e72d57de7d457c Mon Sep 17 00:00:00 2001 -From: Ryan Scott <[email protected]> -Date: Wed, 5 Jan 2022 10:14:47 -0600 -Subject: [PATCH] Allow building with hashable-1.4.* - -Because `hashable-1.4.0.0` adds an `Eq` superclass to `Hashable`, several -`Hashable` instances in `parameterized-utils` now must add additional -constraints to satisfy the corresponding `Eq` instances. For instance, -several `Eq` instances have `TestEquality` constraints, so the `Hashable` -instances must have corresponding `TestEquality` constraints as well. - -Fixes #126. ---- - Changelog.md | 8 ++++++++ - parameterized-utils.cabal | 6 +++--- - src/Data/Parameterized/Classes.hs | 2 +- - src/Data/Parameterized/Context/Safe.hs | 4 ++-- - src/Data/Parameterized/Context/Unsafe.hs | 4 ++-- - src/Data/Parameterized/Some.hs | 2 +- - 6 files changed, 17 insertions(+), 9 deletions(-) - -diff --git a/Changelog.md b/Changelog.md -index a04a089..177130b 100644 ---- a/Changelog.md -+++ b/Changelog.md -@@ -1,5 +1,13 @@ - # Changelog for the `parameterized-utils` package - -+## next -- *TBA* -+ -+ * Allow building with `hashable-1.4.*`. Because `hashable-1.4.0.0` adds an -+ `Eq` superclass to `Hashable`, some instances of `Hashable` in -+ `parameterized-utils` now require additional `TestEquality` constraints, as -+ the corresponding `Eq` instances for these data types also require -+ `TestEquality` constraints. -+ - ## 2.1.4.0 -- *2021 Oct 1* - - * Added the `ifoldLM` and `fromSomeList`, `fromListWith`, and -diff --git a/parameterized-utils.cabal b/parameterized-utils.cabal -index 6df2300..aa86ded 100644 ---- a/parameterized-utils.cabal -+++ b/parameterized-utils.cabal -@@ -56,8 +56,8 @@ library - , containers - , deepseq - , ghc-prim -- , hashable >=1.2 && <1.4 -- , hashtables ==1.2.* -+ , hashable >=1.2 && <1.5 -+ , hashtables >=1.2 && <1.4 - , indexed-traversable - , lens >=4.16 && <5.1 - , mtl -diff --git a/src/Data/Parameterized/Classes.hs b/src/Data/Parameterized/Classes.hs -index b90754d..df1072a 100644 ---- a/src/Data/Parameterized/Classes.hs -+++ b/src/Data/Parameterized/Classes.hs -@@ -351,7 +351,7 @@ instance OrdF f => Ord (TypeAp f tp) where - instance ShowF f => Show (TypeAp f tp) where - showsPrec p (TypeAp x) = showsPrecF p x - --instance HashableF f => Hashable (TypeAp f tp) where -+instance (HashableF f, TestEquality f) => Hashable (TypeAp f tp) where - hashWithSalt s (TypeAp x) = hashWithSaltF s x - - ------------------------------------------------------------------------ -diff --git a/src/Data/Parameterized/Context/Safe.hs b/src/Data/Parameterized/Context/Safe.hs -index 96da3c0..5bdd196 100644 ---- a/src/Data/Parameterized/Context/Safe.hs -+++ b/src/Data/Parameterized/Context/Safe.hs -@@ -595,10 +595,10 @@ instance Hashable (Index ctx tp) where - instance HashableF (Index ctx) where - hashWithSaltF s i = hashWithSalt s (indexVal i) - --instance HashableF f => HashableF (Assignment f) where -+instance (HashableF f, TestEquality f) => HashableF (Assignment f) where - hashWithSaltF = hashWithSalt - --instance HashableF f => Hashable (Assignment f ctx) where -+instance (HashableF f, TestEquality f) => Hashable (Assignment f ctx) where - hashWithSalt s AssignmentEmpty = s - hashWithSalt s (AssignmentExtend asgn x) = (s `hashWithSalt` asgn) `hashWithSaltF` x - -diff --git a/src/Data/Parameterized/Context/Unsafe.hs b/src/Data/Parameterized/Context/Unsafe.hs -index 43e9def..e3f5845 100644 ---- a/src/Data/Parameterized/Context/Unsafe.hs -+++ b/src/Data/Parameterized/Context/Unsafe.hs -@@ -850,10 +850,10 @@ instance HashableF (Index ctx) where - instance Hashable (Index ctx tp) where - hashWithSalt = hashWithSaltF - --instance HashableF f => Hashable (Assignment f ctx) where -+instance (HashableF f, TestEquality f) => Hashable (Assignment f ctx) where - hashWithSalt s (Assignment a) = hashWithSaltF s a - --instance HashableF f => HashableF (Assignment f) where -+instance (HashableF f, TestEquality f) => HashableF (Assignment f) where - hashWithSaltF = hashWithSalt - - instance ShowF f => Show (Assignment f ctx) where -diff --git a/src/Data/Parameterized/Some.hs b/src/Data/Parameterized/Some.hs -index 3df9359..75e9c55 100644 ---- a/src/Data/Parameterized/Some.hs -+++ b/src/Data/Parameterized/Some.hs -@@ -33,7 +33,7 @@ instance TestEquality f => Eq (Some f) where - instance OrdF f => Ord (Some f) where - compare (Some x) (Some y) = toOrdering (compareF x y) - --instance HashableF f => Hashable (Some f) where -+instance (HashableF f, TestEquality f) => Hashable (Some f) where - hashWithSalt s (Some x) = hashWithSaltF s x - hash (Some x) = hashF x -
