Skip to content

Commit 03eb931

Browse files
authored
Merge pull request #305 from haskell-unordered-containers/prepare-1.5
QuantifiedConstraints
2 parents a22f5a2 + 18b14e7 commit 03eb931

File tree

8 files changed

+77
-301
lines changed

8 files changed

+77
-301
lines changed

.github/workflows/haskell-ci-bench.yml

Lines changed: 6 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
#
99
# For more information, see https://github.com/haskell-CI/haskell-ci
1010
#
11-
# version: 0.19.20240514
11+
# version: 0.19.20240608
1212
#
13-
# REGENDATA ("0.19.20240514",["github","--project","cabal.bench.project","-o",".github/workflows/haskell-ci-bench.yml","--github-action-name","Benchmarks"])
13+
# REGENDATA ("0.19.20240608",["github","--project","cabal.bench.project","-o",".github/workflows/haskell-ci-bench.yml","--github-action-name","Benchmarks"])
1414
#
1515
name: Benchmarks
1616
on:
@@ -47,46 +47,6 @@ jobs:
4747
compilerVersion: 9.6.5
4848
setup-method: ghcup
4949
allow-failure: false
50-
- compiler: ghc-9.4.8
51-
compilerKind: ghc
52-
compilerVersion: 9.4.8
53-
setup-method: ghcup
54-
allow-failure: false
55-
- compiler: ghc-9.2.8
56-
compilerKind: ghc
57-
compilerVersion: 9.2.8
58-
setup-method: ghcup
59-
allow-failure: false
60-
- compiler: ghc-9.0.2
61-
compilerKind: ghc
62-
compilerVersion: 9.0.2
63-
setup-method: ghcup
64-
allow-failure: false
65-
- compiler: ghc-9.0.1
66-
compilerKind: ghc
67-
compilerVersion: 9.0.1
68-
setup-method: ghcup
69-
allow-failure: false
70-
- compiler: ghc-8.10.7
71-
compilerKind: ghc
72-
compilerVersion: 8.10.7
73-
setup-method: ghcup
74-
allow-failure: false
75-
- compiler: ghc-8.10.4
76-
compilerKind: ghc
77-
compilerVersion: 8.10.4
78-
setup-method: ghcup
79-
allow-failure: false
80-
- compiler: ghc-8.8.3
81-
compilerKind: ghc
82-
compilerVersion: 8.8.3
83-
setup-method: ghcup
84-
allow-failure: false
85-
- compiler: ghc-8.6.5
86-
compilerKind: ghc
87-
compilerVersion: 8.6.5
88-
setup-method: ghcup
89-
allow-failure: false
9050
fail-fast: false
9151
steps:
9252
- name: apt
@@ -239,10 +199,10 @@ jobs:
239199
rm -f cabal.project.local
240200
- name: constraint set filepath-1.5
241201
run: |
242-
if [ $((HCNUMVER >= 90200)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='filepath ^>=1.5.2.0' all --dry-run ; fi
243-
if [ $((HCNUMVER >= 90200)) -ne 0 ] ; then cabal-plan topo | sort ; fi
244-
if [ $((HCNUMVER >= 90200)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='filepath ^>=1.5.2.0' --dependencies-only -j2 all ; fi
245-
if [ $((HCNUMVER >= 90200)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='filepath ^>=1.5.2.0' all ; fi
202+
$CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='filepath ^>=1.5.2.0' all --dry-run
203+
cabal-plan topo | sort
204+
$CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='filepath ^>=1.5.2.0' --dependencies-only -j2 all
205+
$CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='filepath ^>=1.5.2.0' all
246206
- name: constraint set filepath-1.4.100.0
247207
run: |
248208
if [ $((HCNUMVER < 91000)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='filepath ^>=1.4.100.0' all --dry-run ; fi

.github/workflows/haskell-ci.yml

Lines changed: 9 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
#
99
# For more information, see https://github.com/haskell-CI/haskell-ci
1010
#
11-
# version: 0.19.20240514
11+
# version: 0.19.20240608
1212
#
13-
# REGENDATA ("0.19.20240514",["github","cabal.project"])
13+
# REGENDATA ("0.19.20240608",["github","cabal.project"])
1414
#
1515
name: Haskell-CI
1616
on:
@@ -42,49 +42,9 @@ jobs:
4242
compilerVersion: 9.8.2
4343
setup-method: ghcup
4444
allow-failure: false
45-
- compiler: ghc-9.6.4
45+
- compiler: ghc-9.6.5
4646
compilerKind: ghc
47-
compilerVersion: 9.6.4
48-
setup-method: ghcup
49-
allow-failure: false
50-
- compiler: ghc-9.4.8
51-
compilerKind: ghc
52-
compilerVersion: 9.4.8
53-
setup-method: ghcup
54-
allow-failure: false
55-
- compiler: ghc-9.2.8
56-
compilerKind: ghc
57-
compilerVersion: 9.2.8
58-
setup-method: ghcup
59-
allow-failure: false
60-
- compiler: ghc-9.0.2
61-
compilerKind: ghc
62-
compilerVersion: 9.0.2
63-
setup-method: ghcup
64-
allow-failure: false
65-
- compiler: ghc-9.0.1
66-
compilerKind: ghc
67-
compilerVersion: 9.0.1
68-
setup-method: ghcup
69-
allow-failure: false
70-
- compiler: ghc-8.10.7
71-
compilerKind: ghc
72-
compilerVersion: 8.10.7
73-
setup-method: ghcup
74-
allow-failure: false
75-
- compiler: ghc-8.10.4
76-
compilerKind: ghc
77-
compilerVersion: 8.10.4
78-
setup-method: ghcup
79-
allow-failure: false
80-
- compiler: ghc-8.8.4
81-
compilerKind: ghc
82-
compilerVersion: 8.8.4
83-
setup-method: ghcup
84-
allow-failure: false
85-
- compiler: ghc-8.6.5
86-
compilerKind: ghc
87-
compilerVersion: 8.6.5
47+
compilerVersion: 9.6.5
8848
setup-method: ghcup
8949
allow-failure: false
9050
fail-fast: false
@@ -242,11 +202,11 @@ jobs:
242202
rm -f cabal.project.local
243203
- name: constraint set filepath-1.5
244204
run: |
245-
if [ $((HCNUMVER >= 90200)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='filepath ^>=1.5.2.0' all --dry-run ; fi
246-
if [ $((HCNUMVER >= 90200)) -ne 0 ] ; then cabal-plan topo | sort ; fi
247-
if [ $((HCNUMVER >= 90200)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='filepath ^>=1.5.2.0' --dependencies-only -j2 all ; fi
248-
if [ $((HCNUMVER >= 90200)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='filepath ^>=1.5.2.0' all ; fi
249-
if [ $((HCNUMVER >= 90200)) -ne 0 ] ; then $CABAL v2-test $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='filepath ^>=1.5.2.0' all ; fi
205+
$CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='filepath ^>=1.5.2.0' all --dry-run
206+
cabal-plan topo | sort
207+
$CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='filepath ^>=1.5.2.0' --dependencies-only -j2 all
208+
$CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='filepath ^>=1.5.2.0' all
209+
$CABAL v2-test $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='filepath ^>=1.5.2.0' all
250210
- name: constraint set filepath-1.4.100.0
251211
run: |
252212
if [ $((HCNUMVER < 91000)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='filepath ^>=1.4.100.0' all --dry-run ; fi

.github/workflows/simple.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
strategy:
1515
matrix:
1616
os: [macos-latest, windows-latest]
17-
ghc: ['9.2','9.4.8','9.6.5','9.8.2']
17+
ghc: ['9.6.5','9.8.2']
1818
fail-fast: false
1919
steps:
2020
- name: Set git to use LF
@@ -52,7 +52,7 @@ jobs:
5252
CC: "gcc"
5353
strategy:
5454
matrix:
55-
ghc: ['9.2.8']
55+
ghc: ['9.6.5']
5656
steps:
5757
- name: Checkout
5858
uses: actions/checkout@v4

CHANGES.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,22 @@
11
See also https://pvp.haskell.org/faq
22

3+
## Version 1.5.0.0
4+
5+
* Add `QuantifiedConstraints` superclasses to `Hashable1/2`:
6+
7+
```haskell
8+
class (Eq1 t, forall a. Hashable a => Hashable (t a)) => Hashable1 t where
9+
class (Eq2 t, forall a. Hashable a => Hashable1 (t a)) => Hashable2 t where
10+
```
11+
12+
* Change contexts of `Compose`, `Product` and `Sum` instances.
13+
This and above is the similar change as [CLC proposal #10](https://github.com/haskell/core-libraries-committee/issues/10)
14+
15+
* The above changes require `base-4.18.0.0`, so we drop support for GHC prior GHC-9.6.5
16+
(The `hashable-1.4` branch will be maintained for time being for older GHC users).
17+
18+
* Make `Arg a b` instance behave as `Hashable a` instance.
19+
320
## Version 1.4.7.0
421

522
* Make `arch-native` disabled by default.

hashable-bench/hashable-bench.cabal

Lines changed: 10 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,7 @@ stability: Provisional
2020
category: Data
2121
build-type: Simple
2222
tested-with:
23-
GHC ==8.6.5
24-
|| ==8.8.3
25-
|| ==8.10.4
26-
|| ==8.10.7
27-
|| ==9.0.1
28-
|| ==9.0.2
29-
|| ==9.2.8
30-
|| ==9.4.8
31-
|| ==9.6.5
23+
GHC ==9.6.5
3224
|| ==9.8.2
3325
|| ==9.10.1
3426

@@ -37,13 +29,6 @@ extra-source-files:
3729
include/HsXXHash.h
3830
xxHash-0.8.2/xxhash.h
3931

40-
flag integer-gmp
41-
description:
42-
Are we using @integer-gmp@ to provide fast Integer instances? No effect on GHC-9.0 or later.
43-
44-
manual: False
45-
default: True
46-
4732
library
4833
exposed-modules:
4934
Data.Hashable
@@ -74,38 +59,17 @@ library
7459
, ghc-prim
7560
, text >=1.2.3.0 && <1.3 || >=2.0 && <2.2
7661

77-
if impl(ghc >=9.2)
78-
-- depend on os-string on newer GHCs only.
79-
-- os-string has tight lower bound on bytestring, which prevents
80-
-- using bundled version on older GHCs.
81-
build-depends: os-string >=2.0.2
82-
83-
-- we also ensure that we can get filepath-1.5 only with GHC-9.2
84-
-- therefore there is else-branch with stricter upper bound.
85-
build-depends: filepath >=1.4.1.2 && <1.6
86-
87-
else
88-
build-depends: filepath >=1.4.1.2 && <1.5
89-
90-
if !impl(ghc >=9.2)
91-
build-depends: base-orphans >=0.8.6
62+
-- depend on os-string on newer GHCs only.
63+
-- os-string has tight lower bound on bytestring, which prevents
64+
-- using bundled version on older GHCs.
65+
build-depends: os-string >=2.0.2
9266

93-
if !impl(ghc >=9.4)
94-
build-depends: data-array-byte >=0.1.0.1 && <0.2
67+
-- we also ensure that we can get filepath-1.5 only with GHC-9.2
68+
-- therefore there is else-branch with stricter upper bound.
69+
build-depends: filepath >=1.4.200.1 && <1.6
9570

96-
if impl(ghc >=9)
97-
build-depends: ghc-bignum >=1.0 && <1.4
98-
99-
if !impl(ghc >=9.2)
100-
build-depends: ghc-bignum-orphans >=0.1 && <0.2
101-
102-
else
103-
if flag(integer-gmp)
104-
build-depends: integer-gmp >=0.4 && <1.1
105-
106-
else
107-
-- this is needed for the automatic flag to be well-balanced
108-
build-depends: integer-simple
71+
-- Integer internals
72+
build-depends: ghc-bignum >=1.3 && <1.4
10973

11074
default-language: Haskell2010
11175
other-extensions:
@@ -146,12 +110,6 @@ benchmark hashable-benchmark
146110
ghc-prim
147111
, text >=0.11.0.5
148112

149-
if (impl(ghc) && flag(integer-gmp))
150-
build-depends: integer-gmp >=0.2
151-
152-
if impl(ghc >=7.2.1)
153-
cpp-options: -DGENERICS
154-
155113
ghc-options: -Wall
156114
default-language: Haskell2010
157115

0 commit comments

Comments
 (0)