Skip to content

Commit 7a012ef

Browse files
committed
Support GHC-8.6.5...9.10.1
1 parent c832c23 commit 7a012ef

File tree

3 files changed

+55
-76
lines changed

3 files changed

+55
-76
lines changed

.github/workflows/haskell-ci.yml

Lines changed: 34 additions & 58 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"
@@ -188,14 +164,14 @@ jobs:
188164
- name: install cabal-docspec
189165
run: |
190166
mkdir -p $HOME/.cabal/bin
191-
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
192-
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 -
193169
xz -d < cabal-docspec.xz > $HOME/.cabal/bin/cabal-docspec
194170
rm -f cabal-docspec.xz
195171
chmod a+x $HOME/.cabal/bin/cabal-docspec
196172
cabal-docspec --version
197173
- name: checkout
198-
uses: actions/checkout@v3
174+
uses: actions/checkout@v4
199175
with:
200176
path: source
201177
- name: initial cabal.project for sdist
@@ -223,15 +199,15 @@ jobs:
223199
echo " ghc-options: -Werror=missing-methods" >> cabal.project
224200
cat >> cabal.project <<EOF
225201
EOF
226-
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(http-api-data)$/; }' >> cabal.project.local
202+
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(http-api-data)$/; }' >> cabal.project.local
227203
cat cabal.project
228204
cat cabal.project.local
229205
- name: dump install plan
230206
run: |
231207
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
232208
cabal-plan
233209
- name: restore cache
234-
uses: actions/cache/restore@v3
210+
uses: actions/cache/restore@v4
235211
with:
236212
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
237213
path: ~/.cabal/store
@@ -274,7 +250,7 @@ jobs:
274250
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='http-api-data +use-text-show' --dependencies-only -j2 all
275251
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='http-api-data +use-text-show' all
276252
- name: save cache
277-
uses: actions/cache/save@v3
253+
uses: actions/cache/save@v4
278254
if: always()
279255
with:
280256
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}

CHANGELOG.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
0.6.1
2-
---
32

3+
* Require at least GHC-8.6
44
* Support `cookie-0.5.0`, see [#137](https://github.com/fizruk/http-api-data/pull/137).
5-
Note that `cookie-0.5.0`'s parser now drops removes double quotes around cookie values.
5+
6+
Note that `cookie-0.5.0`'s parser now removes double quotes around cookie values.
67

78
0.6
89
---

http-api-data.cabal

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
cabal-version: 1.12
22
name: http-api-data
33
version: 0.6.1
4+
<<<<<<< HEAD
45
x-revision: 1
6+
=======
7+
>>>>>>> 3f30258 (Support GHC-8.6.5...9.10.1)
58

69
synopsis: Converting to/from HTTP API data like URL pieces, headers and query parameters.
710
category: Web
@@ -24,16 +27,15 @@ extra-source-files:
2427
README.md
2528

2629
tested-with:
27-
GHC==8.2.2,
28-
GHC==8.4.4,
2930
GHC==8.6.5,
3031
GHC==8.8.4,
3132
GHC==8.10.7,
3233
GHC==9.0.2,
3334
GHC==9.2.8,
34-
GHC==9.4.7,
35-
GHC==9.6.3,
36-
GHC==9.8.1
35+
GHC==9.4.8,
36+
GHC==9.6.5,
37+
GHC==9.8.2,
38+
GHC==9.10.1
3739

3840
flag use-text-show
3941
description: Use text-show library for efficient ToHttpApiData implementations.
@@ -44,26 +46,26 @@ library
4446
hs-source-dirs: src/
4547

4648
-- GHC bundled
47-
build-depends: base >= 4.10.1.0 && < 4.20
49+
build-depends: base >= 4.12.0.0 && < 4.21
4850
, bytestring >= 0.10.8.2 && < 0.13
49-
, containers >= 0.5.10.2 && < 0.7
51+
, containers >= 0.6.0.1 && < 0.8
5052
, text >= 1.2.3.0 && < 1.3 || >=2.0 && <2.2
51-
, transformers >= 0.5.2.0 && < 0.7
53+
, transformers >= 0.5.6.2 && < 0.7
5254

5355
-- other-dependencies
5456
build-depends:
5557
cookie >= 0.4.3 && < 0.6
56-
, hashable >= 1.2.7.0 && < 1.5
57-
, http-types >= 0.12.3 && < 0.13
58-
, text-iso8601 >= 0.1 && < 0.2
59-
, tagged >= 0.8.5 && < 0.9
58+
, hashable >= 1.4.4.0 && < 1.5
59+
, http-types >= 0.12.4 && < 0.13
60+
, text-iso8601 >= 0.1.1 && < 0.2
61+
, tagged >= 0.8.8 && < 0.9
6062
, time-compat >= 1.9.5 && < 1.10
61-
, unordered-containers >= 0.2.10.0 && < 0.3
62-
, uuid-types >= 1.0.3 && < 1.1
63+
, unordered-containers >= 0.2.20.0 && < 0.3
64+
, uuid-types >= 1.0.6 && < 1.1
6365

6466
if flag(use-text-show)
6567
cpp-options: -DUSE_TEXT_SHOW
66-
build-depends: text-show >= 3.8.2 && <3.11
68+
build-depends: text-show >= 3.10.5 && <3.11
6769

6870
exposed-modules:
6971
Web.HttpApiData
@@ -97,7 +99,7 @@ test-suite spec
9799

98100
build-depends: HUnit >= 1.6.0.0 && <1.7
99101
, hspec >= 2.7.1 && <2.12
100-
, QuickCheck >= 2.13.1 && <2.15
102+
, QuickCheck >= 2.13.1 && <2.16
101103
, quickcheck-instances >= 0.3.25.2 && <0.4
102104

103105
source-repository head

0 commit comments

Comments
 (0)