Skip to content

Commit 0490993

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

File tree

11 files changed

+99
-154
lines changed

11 files changed

+99
-154
lines changed

.github/workflows/haskell-ci.yml

Lines changed: 35 additions & 85 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,24 +27,29 @@ 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.8.1
35+
- compiler: ghc-9.10.1
3636
compilerKind: ghc
37-
compilerVersion: 9.8.1
37+
compilerVersion: 9.10.1
3838
setup-method: ghcup
3939
allow-failure: false
40-
- compiler: ghc-9.6.3
40+
- compiler: ghc-9.8.2
4141
compilerKind: ghc
42-
compilerVersion: 9.6.3
42+
compilerVersion: 9.8.2
4343
setup-method: ghcup
4444
allow-failure: false
45-
- compiler: ghc-9.4.7
45+
- compiler: ghc-9.6.5
4646
compilerKind: ghc
47-
compilerVersion: 9.4.7
47+
compilerVersion: 9.6.5
48+
setup-method: ghcup
49+
allow-failure: false
50+
- compiler: ghc-9.4.8
51+
compilerKind: ghc
52+
compilerVersion: 9.4.8
4853
setup-method: ghcup
4954
allow-failure: false
5055
- compiler: ghc-9.2.8
@@ -65,44 +70,24 @@ jobs:
6570
- compiler: ghc-8.8.4
6671
compilerKind: ghc
6772
compilerVersion: 8.8.4
68-
setup-method: hvr-ppa
73+
setup-method: ghcup
6974
allow-failure: false
7075
- compiler: ghc-8.6.5
7176
compilerKind: ghc
7277
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
78+
setup-method: ghcup
8479
allow-failure: false
8580
fail-fast: false
8681
steps:
8782
- name: apt
8883
run: |
8984
apt-get update
9085
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
86+
mkdir -p "$HOME/.ghcup/bin"
87+
curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup"
88+
chmod a+x "$HOME/.ghcup/bin/ghcup"
89+
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
90+
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
10691
env:
10792
HCKIND: ${{ matrix.compilerKind }}
10893
HCNAME: ${{ matrix.compiler }}
@@ -114,22 +99,13 @@ jobs:
11499
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
115100
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
116101
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-
102+
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
103+
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
104+
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
105+
echo "HC=$HC" >> "$GITHUB_ENV"
106+
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
107+
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
108+
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
133109
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
134110
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
135111
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
@@ -176,11 +152,6 @@ jobs:
176152
- name: update cabal index
177153
run: |
178154
$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
184155
- name: install cabal-plan
185156
run: |
186157
mkdir -p $HOME/.cabal/bin
@@ -193,26 +164,14 @@ jobs:
193164
- name: install cabal-docspec
194165
run: |
195166
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 -
167+
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
168+
echo '2d18a3f79619e8ec5f11870f926f6dc2616e02a6c889315b7f82044b95a1adb9 cabal-docspec.xz' | sha256sum -c -
198169
xz -d < cabal-docspec.xz > $HOME/.cabal/bin/cabal-docspec
199170
rm -f cabal-docspec.xz
200171
chmod a+x $HOME/.cabal/bin/cabal-docspec
201172
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
214173
- name: checkout
215-
uses: actions/checkout@v3
174+
uses: actions/checkout@v4
216175
with:
217176
path: source
218177
- name: initial cabal.project for sdist
@@ -271,15 +230,15 @@ jobs:
271230
cat >> cabal.project <<EOF
272231
allow-newer: hermes-json:attoparsec-iso8601
273232
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
233+
$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
275234
cat cabal.project
276235
cat cabal.project.local
277236
- name: dump install plan
278237
run: |
279238
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
280239
cabal-plan
281240
- name: restore cache
282-
uses: actions/cache/restore@v3
241+
uses: actions/cache/restore@v4
283242
with:
284243
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
285244
path: ~/.cabal/store
@@ -297,18 +256,9 @@ jobs:
297256
run: |
298257
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH all
299258
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
309259
- name: haddock
310260
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
261+
$CABAL v2-haddock --disable-documentation --haddock-all $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all
312262
- name: unconstrained build
313263
run: |
314264
rm -f cabal.project.local
@@ -329,7 +279,7 @@ jobs:
329279
$CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='aeson +ordered-keymap' all
330280
$CABAL v2-test $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='aeson +ordered-keymap' all
331281
- name: save cache
332-
uses: actions/cache/save@v3
282+
uses: actions/cache/save@v4
333283
if: always()
334284
with:
335285
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}

aeson.cabal

Lines changed: 12 additions & 16 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,16 +12,15 @@ 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
2119
|| ==9.2.8
22-
|| ==9.4.7
23-
|| ==9.6.3
24-
|| ==9.8.1
20+
|| ==9.4.8
21+
|| ==9.6.5
22+
|| ==9.8.2
23+
|| ==9.10.1
2524

2625
synopsis: Fast JSON parsing and encoding
2726
homepage: https://github.com/haskell/aeson
@@ -93,13 +92,13 @@ library
9392

9493
-- GHC bundled libs
9594
build-depends:
96-
, base >=4.10.0.0 && <5
95+
, base >=4.12.0.0 && <5
9796
, bytestring >=0.10.8.2 && <0.13
98-
, containers >=0.5.10.2 && <0.7
99-
, deepseq >=1.4.3.0 && <1.6
97+
, containers >=0.6.0.1 && <0.8
98+
, deepseq >=1.4.4.0 && <1.6
10099
, exceptions >=0.10.4 && <0.11
101100
, ghc-prim >=0.5.0.0 && <0.12
102-
, template-haskell >=2.12.0.0 && <2.22
101+
, template-haskell >=2.14.0.0 && <2.23
103102
, text >=1.2.3.0 && <1.3 || >=2.0 && <2.2
104103
, time >=1.8.0.2 && <1.13
105104

@@ -108,9 +107,6 @@ library
108107
, generically >=0.1 && <0.2
109108
, time-compat >=1.9.6 && <1.10
110109

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

@@ -126,7 +122,7 @@ library
126122
, network-uri ^>=2.6.4.1
127123
, OneTuple ^>=0.4.1.1
128124
, primitive ^>=0.8.0.0 || ^>=0.9.0.0
129-
, QuickCheck ^>=2.14.3
125+
, QuickCheck ^>=2.14.3 || ^>=2.15
130126
, scientific ^>=0.3.7.0
131127
, semialign ^>=1.3
132128
, strict ^>=0.5
@@ -219,7 +215,7 @@ test-suite aeson-tests
219215
, network-uri
220216
, OneTuple
221217
, primitive
222-
, QuickCheck >=2.14.2 && <2.15
218+
, QuickCheck >=2.14.2 && <2.16
223219
, quickcheck-instances >=0.3.29 && <0.4
224220
, scientific
225221
, strict

attoparsec-aeson/attoparsec-aeson.cabal

Lines changed: 8 additions & 9 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,16 +19,15 @@ 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
2826
|| ==9.2.8
29-
|| ==9.4.7
30-
|| ==9.6.3
31-
|| ==9.8.1
27+
|| ==9.4.8
28+
|| ==9.6.5
29+
|| ==9.8.2
30+
|| ==9.10.1
3231

3332
library
3433
hs-source-dirs: src
@@ -43,9 +42,9 @@ library
4342
Data.Aeson.Internal.Text
4443

4544
build-depends:
46-
, aeson >=2.2.0.0 && <2.3
45+
, aeson >=2.2.3.0 && <2.3
4746
, attoparsec >=0.14.2 && <0.15
48-
, base >=4.10.0.0 && <5
47+
, base >=4.12.0.0 && <5
4948
, bytestring >=0.10.8.2 && <0.13
5049
, character-ps ^>=0.1
5150
, integer-conversion >=0.1 && <0.2

attoparsec-iso8601/attoparsec-iso8601.cabal

Lines changed: 8 additions & 9 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.0
33
synopsis: Parsing of ISO 8601 dates, originally from aeson
44
description: Parsing of ISO 8601 dates, originally from aeson.
55
license: BSD3
@@ -17,16 +17,15 @@ 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
2624
|| ==9.2.8
27-
|| ==9.4.7
28-
|| ==9.6.3
29-
|| ==9.8.1
25+
|| ==9.4.8
26+
|| ==9.6.5
27+
|| ==9.8.2
28+
|| ==9.10.1
3029

3130
extra-source-files:
3231
changelog.md
@@ -42,10 +41,10 @@ library
4241

4342
build-depends:
4443
attoparsec >=0.14.2 && <0.15
45-
, base >=4.10.0.0 && <5
44+
, base >=4.12.0.0 && <5
4645
, integer-conversion >=0.1 && <0.2
4746
, text >=1.2.3.0 && <1.3.0.0 || >=2.0 && <2.2
48-
, time >=1.6.0.1 && <1.13
47+
, time >=1.8.0.2 && <1.13
4948
, time-compat >=1.9.4 && <1.10
5049

5150
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.

0 commit comments

Comments
 (0)