Skip to content

Commit a57ce98

Browse files
authored
Support GHC-9.12.2 (#584)
1 parent cfc69fa commit a57ce98

3 files changed

Lines changed: 47 additions & 32 deletions

File tree

.github/workflows/ci.yml

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,19 @@ jobs:
1313
runs-on: ubuntu-latest
1414
strategy:
1515
matrix:
16-
cabal: ["3.8"]
17-
ghc: ["9.4.4"]
16+
cabal: ["3.14"]
17+
ghc: ["9.12.2"]
1818

1919
steps:
20-
- uses: actions/checkout@v3
20+
- uses: actions/checkout@v4
2121

22-
- uses: haskell/actions/setup@v2
22+
- uses: haskell-actions/setup@v2
2323
name: Setup Haskell
2424
with:
2525
ghc-version: ${{ matrix.ghc }}
2626
cabal-version: ${{ matrix.cabal }}
2727

28-
- uses: actions/cache@v3
28+
- uses: actions/cache@v4
2929
name: Cache ~/.cabal/store
3030
with:
3131
path: ~/.cabal/store
@@ -40,18 +40,18 @@ jobs:
4040
runs-on: ubuntu-latest
4141
strategy:
4242
matrix:
43-
cabal: ["3.8"]
44-
ghc: ["9.4.4"]
43+
cabal: ["3.14"]
44+
ghc: ["9.12.2"]
4545
steps:
46-
- uses: actions/checkout@v3
46+
- uses: actions/checkout@v4
4747

48-
- uses: haskell/actions/setup@v2
48+
- uses: haskell-actions/setup@v2
4949
name: Setup Haskell
5050
with:
5151
ghc-version: ${{ matrix.ghc }}
5252
cabal-version: ${{ matrix.cabal }}
5353

54-
- uses: actions/cache@v3
54+
- uses: actions/cache@v4
5555
name: Cache ~/.cabal/store
5656
with:
5757
path: ~/.cabal/store
@@ -75,18 +75,18 @@ jobs:
7575
runs-on: ubuntu-latest
7676
strategy:
7777
matrix:
78-
cabal: ["3.8"]
79-
ghc: ["9.4.4"]
78+
cabal: ["3.14"]
79+
ghc: ["9.12.2"]
8080
steps:
81-
- uses: actions/checkout@v3
81+
- uses: actions/checkout@v4
8282

83-
- uses: haskell/actions/setup@v2
83+
- uses: haskell-actions/setup@v2
8484
name: Setup Haskell
8585
with:
8686
ghc-version: ${{ matrix.ghc }}
8787
cabal-version: ${{ matrix.cabal }}
8888

89-
- uses: actions/cache@v3
89+
- uses: actions/cache@v4
9090
name: Cache ~/.cabal/store
9191
with:
9292
path: ~/.cabal/store
@@ -110,18 +110,18 @@ jobs:
110110
runs-on: ubuntu-latest
111111
strategy:
112112
matrix:
113-
cabal: ["3.8"]
114-
ghc: ["9.4.4"]
113+
cabal: ["3.14"]
114+
ghc: ["9.12.2"]
115115
steps:
116-
- uses: actions/checkout@v3
116+
- uses: actions/checkout@v4
117117

118-
- uses: haskell/actions/setup@v2
118+
- uses: haskell-actions/setup@v2
119119
name: Setup Haskell
120120
with:
121121
ghc-version: ${{ matrix.ghc }}
122122
cabal-version: ${{ matrix.cabal }}
123123

124-
- uses: actions/cache@v3
124+
- uses: actions/cache@v4
125125
name: Cache ~/.cabal/store
126126
with:
127127
path: ~/.cabal/store
@@ -136,12 +136,12 @@ jobs:
136136
runs-on: ubuntu-latest
137137
strategy:
138138
matrix:
139-
cabal: ["3.8"]
140-
ghc: ["9.4.4"]
139+
cabal: ["3.14"]
140+
ghc: ["9.12.2"]
141141
steps:
142-
- uses: actions/checkout@v3
142+
- uses: actions/checkout@v4
143143

144-
- uses: haskell/actions/setup@v2
144+
- uses: haskell-actions/setup@v2
145145
name: Setup Haskell
146146
with:
147147
ghc-version: ${{ matrix.ghc }}

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,9 +187,9 @@ If you're on Linux or macOS, then the process is easy:
187187
terminal
188188

189189
```shell
190-
ghcup install ghc 9.2.4
191-
ghcup set ghc 9.2.4
192-
ghcup install cabal 3.2.0.0
190+
ghcup install ghc 9.12.2
191+
ghcup set ghc 9.12.2
192+
ghcup install cabal 3.14.0.0
193193
```
194194
3. Run `cabal update` to fetch the latest info about Haskell packages.
195195

learn4haskell.cabal

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,18 @@ extra-doc-files: README.md
1818
tested-with: GHC == 8.10.4
1919
GHC == 9.0.2
2020
GHC == 9.2.7
21-
GHC == 9.4.4
21+
GHC == 9.4.7
22+
GHC == 9.6.7
23+
GHC == 9.8.4
24+
GHC == 9.10.3
25+
GHC == 9.12.2
2226

2327
source-repository head
2428
type: git
2529
location: https://github.com/kowainik/learn4haskell.git
2630

2731
common common-options
28-
build-depends: base >= 4.14.0.0 && < 4.18
32+
build-depends: base >= 4.14.0.0 && < 4.23
2933

3034
ghc-options: -Wall
3135
-Wcompat
@@ -44,16 +48,27 @@ common common-options
4448
if impl(ghc >= 9.2)
4549
ghc-options: -Woperator-whitespace
4650
-Wredundant-bang-patterns
51+
if impl(ghc >= 9.4 && < 9.10)
52+
ghc-options: -Wforall-identifier
4753
if impl(ghc >= 9.4)
4854
ghc-options: -Wredundant-strictness-flags
49-
-Wforall-identifier
55+
if impl(ghc >= 9.8)
56+
ghc-options: -Wterm-variable-capture
57+
-Winconsistent-flags
58+
if impl(ghc >= 9.10)
59+
ghc-options: -Wincomplete-record-selectors
60+
-Wdeprecated-type-abstractions
61+
-Wdata-kinds-tc
62+
-Wdefaulted-exception-context
63+
if impl(ghc >= 9.12)
64+
ghc-options: -Wview-pattern-signatures
5065

5166
default-language: Haskell2010
5267

5368
common common-doctest
5469
import: common-options
5570
hs-source-dirs: test
56-
build-depends: doctest >= 0.17 && < 0.22
71+
build-depends: doctest >= 0.17 && < 0.25
5772
ghc-options: -threaded
5873

5974
library
@@ -74,7 +89,7 @@ test-suite learn4haskell-test
7489
Test.Chapter3
7590
Test.Chapter4
7691
build-depends: learn4haskell
77-
, hspec >= 2.7.4 && < 2.11
92+
, hspec >= 2.7.4 && < 2.12
7893
, hspec-hedgehog
7994
, hedgehog >= 1.0.2 && < 2
8095
ghc-options: -threaded

0 commit comments

Comments
 (0)