Skip to content

Commit 0bc2b69

Browse files
authored
Merge pull request #149 from fizruk/ghc-9.12
Support GHC-9.12
2 parents 320563a + 583459b commit 0bc2b69

File tree

3 files changed

+39
-29
lines changed

3 files changed

+39
-29
lines changed

.github/workflows/haskell-ci.yml

Lines changed: 30 additions & 20 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.20240708
11+
# version: 0.19.20250330
1212
#
13-
# REGENDATA ("0.19.20240708",["github","cabal.project"])
13+
# REGENDATA ("0.19.20250330",["github","cabal.project"])
1414
#
1515
name: Haskell-CI
1616
on:
@@ -23,7 +23,7 @@ on:
2323
jobs:
2424
linux:
2525
name: Haskell-CI - Linux - ${{ matrix.compiler }}
26-
runs-on: ubuntu-20.04
26+
runs-on: ubuntu-24.04
2727
timeout-minutes:
2828
60
2929
container:
@@ -32,19 +32,24 @@ jobs:
3232
strategy:
3333
matrix:
3434
include:
35+
- compiler: ghc-9.12.2
36+
compilerKind: ghc
37+
compilerVersion: 9.12.2
38+
setup-method: ghcup
39+
allow-failure: false
3540
- compiler: ghc-9.10.1
3641
compilerKind: ghc
3742
compilerVersion: 9.10.1
3843
setup-method: ghcup
3944
allow-failure: false
40-
- compiler: ghc-9.8.2
45+
- compiler: ghc-9.8.4
4146
compilerKind: ghc
42-
compilerVersion: 9.8.2
47+
compilerVersion: 9.8.4
4348
setup-method: ghcup
4449
allow-failure: false
45-
- compiler: ghc-9.6.6
50+
- compiler: ghc-9.6.7
4651
compilerKind: ghc
47-
compilerVersion: 9.6.6
52+
compilerVersion: 9.6.7
4853
setup-method: ghcup
4954
allow-failure: false
5055
- compiler: ghc-9.4.8
@@ -79,15 +84,29 @@ jobs:
7984
allow-failure: false
8085
fail-fast: false
8186
steps:
82-
- name: apt
87+
- name: apt-get install
8388
run: |
8489
apt-get update
8590
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
91+
- name: Install GHCup
92+
run: |
8693
mkdir -p "$HOME/.ghcup/bin"
87-
curl -sL https://downloads.haskell.org/ghcup/0.1.30.0/x86_64-linux-ghcup-0.1.30.0 > "$HOME/.ghcup/bin/ghcup"
94+
curl -sL https://downloads.haskell.org/ghcup/0.1.50.1/x86_64-linux-ghcup-0.1.50.1 > "$HOME/.ghcup/bin/ghcup"
8895
chmod a+x "$HOME/.ghcup/bin/ghcup"
96+
- name: Install cabal-install
97+
run: |
98+
"$HOME/.ghcup/bin/ghcup" install cabal 3.14.1.1-p1 || (cat "$HOME"/.ghcup/logs/*.* && false)
99+
echo "CABAL=$HOME/.ghcup/bin/cabal-3.14.1.1-p1 -vnormal+nowrap" >> "$GITHUB_ENV"
100+
- name: Install GHC (GHCup)
101+
if: matrix.setup-method == 'ghcup'
102+
run: |
89103
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
90-
"$HOME/.ghcup/bin/ghcup" install cabal 3.12.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
104+
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
105+
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
106+
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
107+
echo "HC=$HC" >> "$GITHUB_ENV"
108+
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
109+
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
91110
env:
92111
HCKIND: ${{ matrix.compilerKind }}
93112
HCNAME: ${{ matrix.compiler }}
@@ -98,21 +117,12 @@ jobs:
98117
echo "LANG=C.UTF-8" >> "$GITHUB_ENV"
99118
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
100119
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
101-
HCDIR=/opt/$HCKIND/$HCVER
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.12.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
109120
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
110121
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
111122
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
112123
echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
113124
echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
114125
echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
115-
echo "GHCJSARITH=0" >> "$GITHUB_ENV"
116126
env:
117127
HCKIND: ${{ matrix.compilerKind }}
118128
HCNAME: ${{ matrix.compiler }}
@@ -250,8 +260,8 @@ jobs:
250260
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='http-api-data +use-text-show' --dependencies-only -j2 all
251261
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='http-api-data +use-text-show' all
252262
- name: save cache
253-
uses: actions/cache/save@v4
254263
if: always()
264+
uses: actions/cache/save@v4
255265
with:
256266
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
257267
path: ~/.cabal/store

http-api-data.cabal

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
cabal-version: 1.12
22
name: http-api-data
3-
version: 0.6.1
4-
x-revision: 1
3+
version: 0.6.2
54

65
synopsis: Converting to/from HTTP API data like URL pieces, headers and query parameters.
76
category: Web
@@ -30,9 +29,10 @@ tested-with:
3029
GHC==9.0.2,
3130
GHC==9.2.8,
3231
GHC==9.4.8,
33-
GHC==9.6.6,
34-
GHC==9.8.2,
35-
GHC==9.10.1
32+
GHC==9.6.7,
33+
GHC==9.8.4,
34+
GHC==9.10.1,
35+
GHC==9.12.2
3636

3737
flag use-text-show
3838
description: Use text-show library for efficient ToHttpApiData implementations.
@@ -43,15 +43,15 @@ library
4343
hs-source-dirs: src/
4444

4545
-- GHC bundled
46-
build-depends: base >= 4.12.0.0 && < 4.21
46+
build-depends: base >= 4.12.0.0 && < 4.22
4747
, bytestring >= 0.10.8.2 && < 0.13
4848
, containers >= 0.6.0.1 && < 0.8
4949
, text >= 1.2.3.0 && < 1.3 || >=2.0 && <2.2
5050
, transformers >= 0.5.6.2 && < 0.7
5151

5252
-- other-dependencies
5353
build-depends:
54-
cookie >= 0.4.3 && < 0.6
54+
cookie >= 0.5.1 && < 0.6
5555
, hashable >= 1.4.4.0 && < 1.6
5656
, http-types >= 0.12.4 && < 0.13
5757
, text-iso8601 >= 0.1.1 && < 0.2
@@ -62,7 +62,7 @@ library
6262

6363
if flag(use-text-show)
6464
cpp-options: -DUSE_TEXT_SHOW
65-
build-depends: text-show >= 3.10.5 && <3.11
65+
build-depends: text-show >= 3.10.5 && <3.12
6666

6767
exposed-modules:
6868
Web.HttpApiData

src/Web/Internal/HttpApiData.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -870,7 +870,7 @@ instance FromHttpApiData a => FromHttpApiData (LenientData a) where
870870
-- | /Note:/ this instance works correctly for alphanumeric name and value
871871
--
872872
-- >>> parseUrlPiece "SESSID=r2t5uvjq435r4q7ib3vtdjq120" :: Either Text SetCookie
873-
-- Right (SetCookie {setCookieName = "SESSID", setCookieValue = "r2t5uvjq435r4q7ib3vtdjq120", setCookiePath = Nothing, setCookieExpires = Nothing, setCookieMaxAge = Nothing, setCookieDomain = Nothing, setCookieHttpOnly = False, setCookieSecure = False, setCookieSameSite = Nothing})
873+
-- Right (SetCookie {setCookieName = "SESSID", setCookieValue = "r2t5uvjq435r4q7ib3vtdjq120", setCookiePath = Nothing, setCookieExpires = Nothing, setCookieMaxAge = Nothing, setCookieDomain = Nothing, setCookieHttpOnly = False, setCookieSecure = False, setCookieSameSite = Nothing, setCookiePartitioned = False})
874874
instance FromHttpApiData SetCookie where
875875
parseUrlPiece = parseHeader . encodeUtf8
876876
parseHeader = Right . parseSetCookie

0 commit comments

Comments
 (0)