Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit d4b9cb3

Browse files
committed
Drop support for GHCs prior 8.6.5
1 parent 5b1c752 commit d4b9cb3

File tree

7 files changed

+53
-104
lines changed

7 files changed

+53
-104
lines changed

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

Lines changed: 34 additions & 60 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.20240402
11+
# version: 0.19.20240514
1212
#
13-
# REGENDATA ("0.19.20240402",["github","--project","cabal.bench.project","-o",".github/workflows/haskell-ci-bench.yml","--github-action-name","Benchmarks"])
13+
# REGENDATA ("0.19.20240514",["github","--project","cabal.bench.project","-o",".github/workflows/haskell-ci-bench.yml","--github-action-name","Benchmarks"])
1414
#
1515
name: Benchmarks
1616
on:
@@ -27,19 +27,24 @@ jobs:
2727
timeout-minutes:
2828
60
2929
container:
30-
image: buildpack-deps:bionic
30+
image: buildpack-deps:jammy
3131
continue-on-error: ${{ matrix.allow-failure }}
3232
strategy:
3333
matrix:
3434
include:
35+
- compiler: ghc-9.10.1
36+
compilerKind: ghc
37+
compilerVersion: 9.10.1
38+
setup-method: ghcup
39+
allow-failure: false
3540
- compiler: ghc-9.8.2
3641
compilerKind: ghc
3742
compilerVersion: 9.8.2
3843
setup-method: ghcup
3944
allow-failure: false
40-
- compiler: ghc-9.6.4
45+
- compiler: ghc-9.6.5
4146
compilerKind: ghc
42-
compilerVersion: 9.6.4
47+
compilerVersion: 9.6.5
4348
setup-method: ghcup
4449
allow-failure: false
4550
- compiler: ghc-9.4.8
@@ -60,7 +65,7 @@ jobs:
6065
- compiler: ghc-9.0.1
6166
compilerKind: ghc
6267
compilerVersion: 9.0.1
63-
setup-method: hvr-ppa
68+
setup-method: ghcup
6469
allow-failure: false
6570
- compiler: ghc-8.10.7
6671
compilerKind: ghc
@@ -70,51 +75,29 @@ jobs:
7075
- compiler: ghc-8.10.4
7176
compilerKind: ghc
7277
compilerVersion: 8.10.4
73-
setup-method: hvr-ppa
78+
setup-method: ghcup
7479
allow-failure: false
7580
- compiler: ghc-8.8.3
7681
compilerKind: ghc
7782
compilerVersion: 8.8.3
78-
setup-method: hvr-ppa
83+
setup-method: ghcup
7984
allow-failure: false
8085
- compiler: ghc-8.6.5
8186
compilerKind: ghc
8287
compilerVersion: 8.6.5
83-
setup-method: hvr-ppa
84-
allow-failure: false
85-
- compiler: ghc-8.4.4
86-
compilerKind: ghc
87-
compilerVersion: 8.4.4
88-
setup-method: hvr-ppa
89-
allow-failure: false
90-
- compiler: ghc-8.2.2
91-
compilerKind: ghc
92-
compilerVersion: 8.2.2
93-
setup-method: hvr-ppa
88+
setup-method: ghcup
9489
allow-failure: false
9590
fail-fast: false
9691
steps:
9792
- name: apt
9893
run: |
9994
apt-get update
10095
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
101-
if [ "${{ matrix.setup-method }}" = ghcup ]; then
102-
mkdir -p "$HOME/.ghcup/bin"
103-
curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup"
104-
chmod a+x "$HOME/.ghcup/bin/ghcup"
105-
"$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.8.yaml;
106-
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
107-
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
108-
else
109-
apt-add-repository -y 'ppa:hvr/ghc'
110-
apt-get update
111-
apt-get install -y "$HCNAME"
112-
mkdir -p "$HOME/.ghcup/bin"
113-
curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup"
114-
chmod a+x "$HOME/.ghcup/bin/ghcup"
115-
"$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.8.yaml;
116-
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
117-
fi
96+
mkdir -p "$HOME/.ghcup/bin"
97+
curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup"
98+
chmod a+x "$HOME/.ghcup/bin/ghcup"
99+
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
100+
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
118101
env:
119102
HCKIND: ${{ matrix.compilerKind }}
120103
HCNAME: ${{ matrix.compiler }}
@@ -126,22 +109,13 @@ jobs:
126109
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
127110
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
128111
HCDIR=/opt/$HCKIND/$HCVER
129-
if [ "${{ matrix.setup-method }}" = ghcup ]; then
130-
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
131-
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
132-
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
133-
echo "HC=$HC" >> "$GITHUB_ENV"
134-
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
135-
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
136-
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
137-
else
138-
HC=$HCDIR/bin/$HCKIND
139-
echo "HC=$HC" >> "$GITHUB_ENV"
140-
echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV"
141-
echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV"
142-
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
143-
fi
144-
112+
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
113+
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
114+
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
115+
echo "HC=$HC" >> "$GITHUB_ENV"
116+
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
117+
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
118+
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
145119
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * 1ドル + 100 * 2ドル + (3ドル == 0 ? 5ドル != 1 : 3ドル))')
146120
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
147121
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
@@ -198,7 +172,7 @@ jobs:
198172
chmod a+x $HOME/.cabal/bin/cabal-plan
199173
cabal-plan --version
200174
- name: checkout
201-
uses: actions/checkout@v3
175+
uses: actions/checkout@v4
202176
with:
203177
path: source
204178
- name: initial cabal.project for sdist
@@ -226,15 +200,15 @@ jobs:
226200
echo " ghc-options: -Werror=missing-methods" >> cabal.project
227201
cat >> cabal.project <<EOF
228202
EOF
229-
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(hashable-bench)$/; }' >> cabal.project.local
203+
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(hashable-bench)$/; }' >> cabal.project.local
230204
cat cabal.project
231205
cat cabal.project.local
232206
- name: dump install plan
233207
run: |
234208
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
235209
cabal-plan
236210
- name: restore cache
237-
uses: actions/cache/restore@v3
211+
uses: actions/cache/restore@v4
238212
with:
239213
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
240214
path: ~/.cabal/store
@@ -271,18 +245,18 @@ jobs:
271245
if [ $((HCNUMVER >= 90200)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='filepath ^>=1.5.2.0' all ; fi
272246
- name: constraint set filepath-1.4.100.0
273247
run: |
274-
$CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='filepath ^>=1.4.100.0' all --dry-run
275-
cabal-plan topo | sort
276-
$CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='filepath ^>=1.4.100.0' --dependencies-only -j2 all
277-
$CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='filepath ^>=1.4.100.0' all
248+
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
249+
if [ $((HCNUMVER < 91000)) -ne 0 ] ; then cabal-plan topo | sort ; fi
250+
if [ $((HCNUMVER < 91000)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='filepath ^>=1.4.100.0' --dependencies-only -j2 all ; fi
251+
if [ $((HCNUMVER < 91000)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='filepath ^>=1.4.100.0' all ; fi
278252
- name: constraint set random-initial-seed
279253
run: |
280254
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='hashable +random-initial-seed' all --dry-run
281255
cabal-plan topo | sort
282256
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='hashable +random-initial-seed' --dependencies-only -j2 all
283257
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='hashable +random-initial-seed' all
284258
- name: save cache
285-
uses: actions/cache/save@v3
259+
uses: actions/cache/save@v4
286260
if: always()
287261
with:
288262
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}

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

Lines changed: 4 additions & 14 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.20240512
11+
# version: 0.19.20240514
1212
#
13-
# REGENDATA ("0.19.20240512",["github","cabal.project"])
13+
# REGENDATA ("0.19.20240514",["github","cabal.project"])
1414
#
1515
name: Haskell-CI
1616
on:
@@ -87,22 +87,12 @@ jobs:
8787
compilerVersion: 8.6.5
8888
setup-method: ghcup
8989
allow-failure: false
90-
- compiler: ghc-8.4.4
91-
compilerKind: ghc
92-
compilerVersion: 8.4.4
93-
setup-method: ghcup
94-
allow-failure: false
95-
- compiler: ghc-8.2.2
96-
compilerKind: ghc
97-
compilerVersion: 8.2.2
98-
setup-method: ghcup
99-
allow-failure: false
10090
fail-fast: false
10191
steps:
10292
- name: apt
10393
run: |
10494
apt-get update
105-
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 libnuma-dev
95+
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
10696
mkdir -p "$HOME/.ghcup/bin"
10797
curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup"
10898
chmod a+x "$HOME/.ghcup/bin/ghcup"
@@ -210,7 +200,7 @@ jobs:
210200
echo " ghc-options: -Werror=missing-methods" >> cabal.project
211201
cat >> cabal.project <<EOF
212202
EOF
213-
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(hashable)$/; }' >> cabal.project.local
203+
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(hashable)$/; }' >> cabal.project.local
214204
cat cabal.project
215205
cat cabal.project.local
216206
- name: dump install plan

‎.github/workflows/simple.yml‎

Lines changed: 1 addition & 1 deletion
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: ['8.10','9.0','9.2','9.4.5','9.6.2']
17+
ghc: ['8.10','9.0','9.2','9.4.8','9.6.5','9.8.2']
1818
fail-fast: false
1919
steps:
2020
- name: Set git to use LF

‎CHANGES.md‎

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

3+
## Version 1.4.5.0
4+
5+
* Drop support for GHCs prior 8.6.5
6+
37
## Version 1.4.4.0
48

59
* Depend on `os-string-2` for GHC-9.2+

‎hashable-bench/hashable-bench.cabal‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,17 @@ stability: Provisional
2020
category: Data
2121
build-type: Simple
2222
tested-with:
23-
GHC ==8.2.2
24-
|| ==8.4.4
25-
|| ==8.6.5
23+
GHC ==8.6.5
2624
|| ==8.8.3
2725
|| ==8.10.4
2826
|| ==8.10.7
2927
|| ==9.0.1
3028
|| ==9.0.2
3129
|| ==9.2.8
3230
|| ==9.4.8
33-
|| ==9.6.4
31+
|| ==9.6.5
3432
|| ==9.8.2
33+
|| ==9.10.1
3534

3635
extra-source-files:
3736
benchmarks/cbits/*.h

‎hashable.cabal‎

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
cabal-version: 1.12
1+
cabal-version: 2.2
22
name: hashable
3-
version: 1.4.4.0
4-
x-revision: 1
3+
version: 1.4.5.0
54
synopsis: A class for types that can be converted to a hash value
65
description:
76
This package defines a class, 'Hashable', for types that
@@ -14,8 +13,7 @@ description:
1413

1514
homepage: http://github.com/haskell-unordered-containers/hashable
1615

17-
-- SPDX-License-Identifier : BSD-3-Clause
18-
license: BSD3
16+
license: BSD-3-Clause
1917
license-file: LICENSE
2018
author:
2119
Milan Straka <fox@ucw.cz>
@@ -29,9 +27,7 @@ stability: Provisional
2927
category: Data
3028
build-type: Simple
3129
tested-with:
32-
GHC ==8.2.2
33-
|| ==8.4.4
34-
|| ==8.6.5
30+
GHC ==8.6.5
3531
|| ==8.8.4
3632
|| ==8.10.4
3733
|| ==8.10.7
@@ -81,10 +77,10 @@ library
8177
include-dirs: include
8278
hs-source-dirs: src
8379
build-depends:
84-
base >=4.10.1.0 && <4.21
80+
base >=4.12.0.0 && <4.21
8581
, bytestring >=0.10.8.2 && <0.13
86-
, containers >=0.5.10.2 && <0.8
87-
, deepseq >=1.4.3.0 && <1.6
82+
, containers >=0.6.0.1 && <0.8
83+
, deepseq >=1.4.4.0 && <1.6
8884
, ghc-prim
8985
, text >=1.2.3.0 && <1.3 || >=2.0 && <2.2
9086

‎src/Data/Hashable/Class.hs‎

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -154,13 +154,7 @@ import GHC.Integer.GMP.Internals (BigNat (BN#))
154154
import GHC.Natural (Natural (..))
155155
#endif
156156

157-
#if MIN_VERSION_base(4,11,0)
158157
import GHC.Float (castDoubleToWord64, castFloatToWord32)
159-
#else
160-
import Foreign.Marshal.Utils (with)
161-
import Foreign.Ptr (castPtr)
162-
import Foreign.Storable (peek)
163-
#endif
164158

165159
#if MIN_VERSION_base(4,16,0)
166160
import Data.Tuple (Solo (..))
@@ -511,11 +505,7 @@ instance Hashable Float where
511505
| isIEEE x =
512506
assert (sizeOf x >= sizeOf (0::Word32) &&
513507
alignment x >= alignment (0::Word32)) $
514-
#if MIN_VERSION_base(4,11,0)
515508
hash (castFloatToWord32 x)
516-
#else
517-
hash ((unsafeDupablePerformIO $ with x $ peek . castPtr) :: Word32)
518-
#endif
519509
| otherwise = hash (show x)
520510
hashWithSalt = defaultHashWithSalt
521511

@@ -530,11 +520,7 @@ instance Hashable Double where
530520
| isIEEE x =
531521
assert (sizeOf x >= sizeOf (0::Word64) &&
532522
alignment x >= alignment (0::Word64)) $
533-
#if MIN_VERSION_base(4,11,0)
534523
hash (castDoubleToWord64 x)
535-
#else
536-
hash ((unsafeDupablePerformIO $ with x $ peek . castPtr) :: Word64)
537-
#endif
538524
| otherwise = hash (show x)
539525
hashWithSalt = defaultHashWithSalt
540526

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /