Date: Tuesday, February 22, 2022 @ 07:05:49 Author: felixonmars Revision: 1135728
upgpkg: haskell-parameterized-utils 2.1.4.0-31: rebuild with hashable 1.4.0.0, quickcheck-instances 0.3.26.1 Added: haskell-parameterized-utils/trunk/hashable-1.4.patch Modified: haskell-parameterized-utils/trunk/PKGBUILD --------------------+ PKGBUILD | 9 ++- hashable-1.4.patch | 121 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 127 insertions(+), 3 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2022-02-22 06:57:12 UTC (rev 1135727) +++ PKGBUILD 2022-02-22 07:05:49 UTC (rev 1135728) @@ -3,7 +3,7 @@ _hkgname=parameterized-utils pkgname=haskell-parameterized-utils pkgver=2.1.4.0 -pkgrel=30 +pkgrel=31 pkgdesc="Classes and data structures for working with data-kind indexed types" url="https://github.com/GaloisInc/parameterized-utils" license=('BSD') @@ -13,11 +13,14 @@ 'haskell-th-abstraction' 'haskell-vector') makedepends=('ghc' 'uusi' 'haskell-hedgehog' 'haskell-hedgehog-classes' 'haskell-tasty' 'haskell-tasty-ant-xml' 'haskell-tasty-hunit' 'haskell-tasty-hedgehog') -source=(https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz) -sha512sums=('d1c04ed4dd13b385dd86c5982bfea4a9512a591f0c9f29c2e95a132380563a06f2085b1d9c9e66e586503547fc0c9ccb4acfa737aa1778d7e6d5e564c659fad8') +source=(https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz + hashable-1.4.patch) +sha512sums=('d1c04ed4dd13b385dd86c5982bfea4a9512a591f0c9f29c2e95a132380563a06f2085b1d9c9e66e586503547fc0c9ccb4acfa737aa1778d7e6d5e564c659fad8' + '482cc86bc8f692023e2ef9933dc78de6279f2c5309ff8b292b9b09e3182ee95a1b8a4d4b2c260d157b8df9612933dbf31d7a4ba734e537fdbb1a6f68612f3c48') prepare() { cd $_hkgname-$pkgver + patch -p1 -i ../hashable-1.4.patch gen-setup uusi -u lens $_hkgname.cabal } Added: hashable-1.4.patch =================================================================== --- hashable-1.4.patch (rev 0) +++ hashable-1.4.patch 2022-02-22 07:05:49 UTC (rev 1135728) @@ -0,0 +1,121 @@ +From 73ad4b0bb044decda71091a9f0e72d57de7d457c Mon Sep 17 00:00:00 2001 +From: Ryan Scott <rsc...@galois.com> +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 +@@ -142,4 +142,4 @@ test-suite parameterizedTests + + if impl(ghc >= 8.6) + build-depends: +- hedgehog-classes +\ No newline at end of file ++ hedgehog-classes +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 +