Skip to content

Commit e57dc17

Browse files
committed
Support GHC-8.6.5..9.10.1
1 parent c41604b commit e57dc17

File tree

11 files changed

+64
-130
lines changed

11 files changed

+64
-130
lines changed

.github/workflows/haskell-ci.yml

Lines changed: 24 additions & 79 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.17.20231010
11+
# version: 0.19.20240514
1212
#
13-
# REGENDATA ("0.17.20231010",["github","cabal.project"])
13+
# REGENDATA ("0.19.20240514",["github","cabal.project"])
1414
#
1515
name: Haskell-CI
1616
on:
@@ -27,7 +27,7 @@ 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:
@@ -65,44 +65,24 @@ jobs:
6565
- compiler: ghc-8.8.4
6666
compilerKind: ghc
6767
compilerVersion: 8.8.4
68-
setup-method: hvr-ppa
68+
setup-method: ghcup
6969
allow-failure: false
7070
- compiler: ghc-8.6.5
7171
compilerKind: ghc
7272
compilerVersion: 8.6.5
73-
setup-method: hvr-ppa
74-
allow-failure: false
75-
- compiler: ghc-8.4.4
76-
compilerKind: ghc
77-
compilerVersion: 8.4.4
78-
setup-method: hvr-ppa
79-
allow-failure: false
80-
- compiler: ghc-8.2.2
81-
compilerKind: ghc
82-
compilerVersion: 8.2.2
83-
setup-method: hvr-ppa
73+
setup-method: ghcup
8474
allow-failure: false
8575
fail-fast: false
8676
steps:
8777
- name: apt
8878
run: |
8979
apt-get update
9080
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
91-
if [ "${{ matrix.setup-method }}" = ghcup ]; then
92-
mkdir -p "$HOME/.ghcup/bin"
93-
curl -sL https://downloads.haskell.org/ghcup/0.1.19.5/x86_64-linux-ghcup-0.1.19.5 > "$HOME/.ghcup/bin/ghcup"
94-
chmod a+x "$HOME/.ghcup/bin/ghcup"
95-
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
96-
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
97-
else
98-
apt-add-repository -y 'ppa:hvr/ghc'
99-
apt-get update
100-
apt-get install -y "$HCNAME"
101-
mkdir -p "$HOME/.ghcup/bin"
102-
curl -sL https://downloads.haskell.org/ghcup/0.1.19.5/x86_64-linux-ghcup-0.1.19.5 > "$HOME/.ghcup/bin/ghcup"
103-
chmod a+x "$HOME/.ghcup/bin/ghcup"
104-
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
105-
fi
81+
mkdir -p "$HOME/.ghcup/bin"
82+
curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup"
83+
chmod a+x "$HOME/.ghcup/bin/ghcup"
84+
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
85+
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
10686
env:
10787
HCKIND: ${{ matrix.compilerKind }}
10888
HCNAME: ${{ matrix.compiler }}
@@ -114,22 +94,13 @@ jobs:
11494
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
11595
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
11696
HCDIR=/opt/$HCKIND/$HCVER
117-
if [ "${{ matrix.setup-method }}" = ghcup ]; then
118-
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
119-
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
120-
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
121-
echo "HC=$HC" >> "$GITHUB_ENV"
122-
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
123-
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
124-
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
125-
else
126-
HC=$HCDIR/bin/$HCKIND
127-
echo "HC=$HC" >> "$GITHUB_ENV"
128-
echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV"
129-
echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV"
130-
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
131-
fi
132-
97+
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
98+
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
99+
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
100+
echo "HC=$HC" >> "$GITHUB_ENV"
101+
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
102+
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
103+
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
133104
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
134105
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
135106
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
@@ -176,11 +147,6 @@ jobs:
176147
- name: update cabal index
177148
run: |
178149
$CABAL v2-update -v
179-
- name: cache (tools)
180-
uses: actions/cache/restore@v3
181-
with:
182-
key: ${{ runner.os }}-${{ matrix.compiler }}-tools-cb947dfc
183-
path: ~/.haskell-ci-tools
184150
- name: install cabal-plan
185151
run: |
186152
mkdir -p $HOME/.cabal/bin
@@ -193,26 +159,14 @@ jobs:
193159
- name: install cabal-docspec
194160
run: |
195161
mkdir -p $HOME/.cabal/bin
196-
curl -sL https://github.com/phadej/cabal-extras/releases/download/cabal-docspec-0.0.0.20230517/cabal-docspec-0.0.0.20230517-x86_64-linux.xz > cabal-docspec.xz
197-
echo '3b31bbe463ad4d671abbc103db49628562ec48a6604cab278207b5b6acd21ed7 cabal-docspec.xz' | sha256sum -c -
162+
curl -sL https://github.com/phadej/cabal-extras/releases/download/cabal-docspec-0.0.0.20240414/cabal-docspec-0.0.0.20240414-x86_64-linux.xz > cabal-docspec.xz
163+
echo '2d18a3f79619e8ec5f11870f926f6dc2616e02a6c889315b7f82044b95a1adb9 cabal-docspec.xz' | sha256sum -c -
198164
xz -d < cabal-docspec.xz > $HOME/.cabal/bin/cabal-docspec
199165
rm -f cabal-docspec.xz
200166
chmod a+x $HOME/.cabal/bin/cabal-docspec
201167
cabal-docspec --version
202-
- name: install hlint
203-
run: |
204-
if [ $((HCNUMVER >= 90200 && HCNUMVER < 90400)) -ne 0 ] ; then HLINTVER=$(cd /tmp && (${CABAL} v2-install -v $ARG_COMPILER --dry-run hlint --constraint='hlint >=3.5 && <3.6' | perl -ne 'if (/\bhlint-(\d+(\.\d+)*)\b/) { print "$1"; last; }')); echo "HLint version $HLINTVER" ; fi
205-
if [ $((HCNUMVER >= 90200 && HCNUMVER < 90400)) -ne 0 ] ; then if [ ! -e $HOME/.haskell-ci-tools/hlint-$HLINTVER/hlint ]; then echo "Downloading HLint version $HLINTVER"; mkdir -p $HOME/.haskell-ci-tools; curl --write-out 'Status Code: %{http_code} Redirects: %{num_redirects} Total time: %{time_total} Total Dsize: %{size_download}\n' --silent --location --output $HOME/.haskell-ci-tools/hlint-$HLINTVER.tar.gz "https://github.com/ndmitchell/hlint/releases/download/v$HLINTVER/hlint-$HLINTVER-x86_64-linux.tar.gz"; tar -xzv -f $HOME/.haskell-ci-tools/hlint-$HLINTVER.tar.gz -C $HOME/.haskell-ci-tools; fi ; fi
206-
if [ $((HCNUMVER >= 90200 && HCNUMVER < 90400)) -ne 0 ] ; then mkdir -p $CABAL_DIR/bin && ln -sf "$HOME/.haskell-ci-tools/hlint-$HLINTVER/hlint" $CABAL_DIR/bin/hlint ; fi
207-
if [ $((HCNUMVER >= 90200 && HCNUMVER < 90400)) -ne 0 ] ; then hlint --version ; fi
208-
- name: save cache (tools)
209-
uses: actions/cache/save@v3
210-
if: always()
211-
with:
212-
key: ${{ runner.os }}-${{ matrix.compiler }}-tools-cb947dfc
213-
path: ~/.haskell-ci-tools
214168
- name: checkout
215-
uses: actions/checkout@v3
169+
uses: actions/checkout@v4
216170
with:
217171
path: source
218172
- name: initial cabal.project for sdist
@@ -271,15 +225,15 @@ jobs:
271225
cat >> cabal.project <<EOF
272226
allow-newer: hermes-json:attoparsec-iso8601
273227
EOF
274-
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(aeson|aeson-benchmarks|aeson-examples|attoparsec-aeson|attoparsec-iso8601|text-iso8601)$/; }' >> cabal.project.local
228+
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(aeson|aeson-benchmarks|aeson-examples|attoparsec-aeson|attoparsec-iso8601|text-iso8601)$/; }' >> cabal.project.local
275229
cat cabal.project
276230
cat cabal.project.local
277231
- name: dump install plan
278232
run: |
279233
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
280234
cabal-plan
281235
- name: restore cache
282-
uses: actions/cache/restore@v3
236+
uses: actions/cache/restore@v4
283237
with:
284238
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
285239
path: ~/.cabal/store
@@ -297,18 +251,9 @@ jobs:
297251
run: |
298252
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH all
299253
cabal-docspec $ARG_COMPILER
300-
- name: hlint
301-
run: |
302-
if [ $((HCNUMVER >= 90200 && HCNUMVER < 90400)) -ne 0 ] ; then (cd ${PKGDIR_aeson} && hlint -h ${GITHUB_WORKSPACE}/source/.hlint.yaml -XHaskell2010 src) ; fi
303-
if [ $((HCNUMVER >= 90200 && HCNUMVER < 90400)) -ne 0 ] ; then (cd ${PKGDIR_attoparsec_iso8601} && hlint -h ${GITHUB_WORKSPACE}/source/.hlint.yaml -XHaskell2010 src) ; fi
304-
if [ $((HCNUMVER >= 90200 && HCNUMVER < 90400)) -ne 0 ] ; then (cd ${PKGDIR_attoparsec_aeson} && hlint -h ${GITHUB_WORKSPACE}/source/.hlint.yaml -XHaskell2010 src) ; fi
305-
if [ $((HCNUMVER >= 90200 && HCNUMVER < 90400)) -ne 0 ] ; then (cd ${PKGDIR_text_iso8601} && hlint -h ${GITHUB_WORKSPACE}/source/.hlint.yaml -XHaskell2010 src) ; fi
306-
if [ $((HCNUMVER >= 90200 && HCNUMVER < 90400)) -ne 0 ] ; then (cd ${PKGDIR_aeson_examples} && hlint -h ${GITHUB_WORKSPACE}/source/.hlint.yaml -XHaskell2010 src/) ; fi
307-
if [ $((HCNUMVER >= 90200 && HCNUMVER < 90400)) -ne 0 ] ; then (cd ${PKGDIR_aeson_benchmarks} && hlint -h ${GITHUB_WORKSPACE}/source/.hlint.yaml -XHaskell2010 .) ; fi
308-
if [ $((HCNUMVER >= 90200 && HCNUMVER < 90400)) -ne 0 ] ; then (cd ${PKGDIR_aeson_benchmarks} && hlint -h ${GITHUB_WORKSPACE}/source/.hlint.yaml -XHaskell2010 bench examples/src) ; fi
309254
- name: haddock
310255
run: |
311-
if [ $((HCNUMVER >= 80600)) -ne 0 ] ; then $CABAL v2-haddock --disable-documentation --haddock-all $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all ; fi
256+
$CABAL v2-haddock --disable-documentation --haddock-all $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all
312257
- name: unconstrained build
313258
run: |
314259
rm -f cabal.project.local
@@ -329,7 +274,7 @@ jobs:
329274
$CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='aeson +ordered-keymap' all
330275
$CABAL v2-test $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='aeson +ordered-keymap' all
331276
- name: save cache
332-
uses: actions/cache/save@v3
277+
uses: actions/cache/save@v4
333278
if: always()
334279
with:
335280
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}

aeson.cabal

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
cabal-version: 2.2
22
name: aeson
3-
version: 2.2.2.0
3+
version: 2.2.3.0
44
license: BSD-3-Clause
55
license-file: LICENSE
66
category: Text, Web, JSON
@@ -12,9 +12,7 @@ author: Bryan O'Sullivan <[email protected]>
1212
maintainer: Adam Bergmark <[email protected]>
1313
stability: experimental
1414
tested-with:
15-
GHC ==8.2.2
16-
|| ==8.4.4
17-
|| ==8.6.5
15+
GHC ==8.6.5
1816
|| ==8.8.4
1917
|| ==8.10.7
2018
|| ==9.0.2
@@ -93,13 +91,13 @@ library
9391

9492
-- GHC bundled libs
9593
build-depends:
96-
, base >=4.10.0.0 && <5
94+
, base >=4.12.0.0 && <5
9795
, bytestring >=0.10.8.2 && <0.13
98-
, containers >=0.5.10.2 && <0.7
99-
, deepseq >=1.4.3.0 && <1.6
96+
, containers >=0.6.0.1 && <0.8
97+
, deepseq >=1.4.4.0 && <1.6
10098
, exceptions >=0.10.4 && <0.11
10199
, ghc-prim >=0.5.0.0 && <0.12
102-
, template-haskell >=2.12.0.0 && <2.22
100+
, template-haskell >=2.14.0.0 && <2.23
103101
, text >=1.2.3.0 && <1.3 || >=2.0 && <2.2
104102
, time >=1.8.0.2 && <1.13
105103

@@ -108,9 +106,6 @@ library
108106
, generically >=0.1 && <0.2
109107
, time-compat >=1.9.6 && <1.10
110108

111-
if !impl(ghc >=8.6)
112-
build-depends: contravariant >=1.4.1 && <1.6
113-
114109
if !impl(ghc >=9.0)
115110
build-depends: integer-gmp
116111

@@ -126,7 +121,7 @@ library
126121
, network-uri ^>=2.6.4.1
127122
, OneTuple ^>=0.4.1.1
128123
, primitive ^>=0.8.0.0 || ^>=0.9.0.0
129-
, QuickCheck ^>=2.14.3
124+
, QuickCheck ^>=2.14.3 || ^>=2.15
130125
, scientific ^>=0.3.7.0
131126
, semialign ^>=1.3
132127
, strict ^>=0.5
@@ -219,7 +214,7 @@ test-suite aeson-tests
219214
, network-uri
220215
, OneTuple
221216
, primitive
222-
, QuickCheck >=2.14.2 && <2.15
217+
, QuickCheck >=2.14.2 && <2.16
223218
, quickcheck-instances >=0.3.29 && <0.4
224219
, scientific
225220
, strict

attoparsec-aeson/attoparsec-aeson.cabal

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
cabal-version: 2.2
22
name: attoparsec-aeson
3-
version: 2.2.1.0
3+
version: 2.2.2.0
44
synopsis: Parsing of aeson's Value with attoparsec
55
description:
66
Parsing of aeson's Value with attoparsec, originally from aeson.
@@ -19,9 +19,7 @@ homepage: https://github.com/haskell/aeson
1919
bug-reports: https://github.com/haskell/aeson/issues
2020
build-type: Simple
2121
tested-with:
22-
GHC ==8.2.2
23-
|| ==8.4.4
24-
|| ==8.6.5
22+
GHC ==8.6.5
2523
|| ==8.8.4
2624
|| ==8.10.7
2725
|| ==9.0.2
@@ -43,9 +41,9 @@ library
4341
Data.Aeson.Internal.Text
4442

4543
build-depends:
46-
, aeson >=2.2.0.0 && <2.3
44+
, aeson >=2.2.3.0 && <2.3
4745
, attoparsec >=0.14.2 && <0.15
48-
, base >=4.10.0.0 && <5
46+
, base >=4.12.0.0 && <5
4947
, bytestring >=0.10.8.2 && <0.13
5048
, character-ps ^>=0.1
5149
, integer-conversion >=0.1 && <0.2

attoparsec-iso8601/attoparsec-iso8601.cabal

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: attoparsec-iso8601
2-
version: 1.1.0.1
2+
version: 1.1.1
33
synopsis: Parsing of ISO 8601 dates, originally from aeson
44
description: Parsing of ISO 8601 dates, originally from aeson.
55
license: BSD3
@@ -17,9 +17,7 @@ homepage: https://github.com/haskell/aeson
1717
bug-reports: https://github.com/haskell/aeson/issues
1818
build-type: Simple
1919
tested-with:
20-
GHC ==8.2.2
21-
|| ==8.4.4
22-
|| ==8.6.5
20+
GHC ==8.6.5
2321
|| ==8.8.4
2422
|| ==8.10.7
2523
|| ==9.0.2
@@ -42,10 +40,10 @@ library
4240

4341
build-depends:
4442
attoparsec >=0.14.2 && <0.15
45-
, base >=4.10.0.0 && <5
43+
, base >=4.12.0.0 && <5
4644
, integer-conversion >=0.1 && <0.2
4745
, text >=1.2.3.0 && <1.3.0.0 || >=2.0 && <2.2
48-
, time >=1.6.0.1 && <1.13
46+
, time >=1.8.0.2 && <1.13
4947
, time-compat >=1.9.4 && <1.10
5048

5149
source-repository head

attoparsec-iso8601/changelog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
For the latest version of this document, please see [https://github.com/bos/aeson/blob/master/attoparsec-iso8601/changelog.md](https://github.com/bos/aeson/blob/master/attoparsec-iso8601/changelog.md).
22

3+
### 1.1.1.0
4+
5+
- Support GHC-8.6.5...9.10.1
6+
37
### 1.1.0.0
48

59
- Change parsers of types with year (`Day`, `UTCTime`) to require years with at least 4 digits.

benchmarks/aeson-benchmarks.cabal

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@ name: aeson-benchmarks
33
version: 0
44
build-type: Simple
55
tested-with:
6-
GHC ==8.2.2
7-
|| ==8.4.4
8-
|| ==8.6.5
6+
GHC ==8.6.5
97
|| ==8.8.4
108
|| ==8.10.7
119
|| ==9.0.2

cabal.haskell-ci

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@ install-dependencies: False
99
-- GADT docs
1010
haddock: >=8.6
1111

12-
hlint: True
13-
hlint-job: 9.2.8
14-
hlint-yaml: .hlint.yaml
15-
1612
constraint-set ordered-keymap-on
1713
constraints: aeson +ordered-keymap
1814
tests: True

changelog.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
For the latest version of this document, please see [https://github.com/haskell/aeson/blob/master/changelog.md](https://github.com/haskell/aeson/blob/master/changelog.md).
22

3-
### next
3+
### 2.2.2.0
44

5+
* Support GHC-8.6.5...9.10.1
56
* Depend on `character-ps` instead of defining own Word8 pattern synonyms
67

78
### 2.2.1.0

0 commit comments

Comments
 (0)