Skip to content

Commit a84e4a7

Browse files
committed
GHC-9.14 support
1 parent 5aa7f6f commit a84e4a7

File tree

15 files changed

+243
-59
lines changed

15 files changed

+243
-59
lines changed

.github/workflows/haskell-ci.yml

Lines changed: 49 additions & 3 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.20250821
11+
# version: 0.19.20251118
1212
#
13-
# REGENDATA ("0.19.20250821",["github","cabal.project"])
13+
# REGENDATA ("0.19.20251118",["github","cabal.project"])
1414
#
1515
name: Haskell-CI
1616
on:
@@ -20,6 +20,9 @@ on:
2020
pull_request:
2121
branches:
2222
- main
23+
merge_group:
24+
branches:
25+
- main
2326
jobs:
2427
linux:
2528
name: Haskell-CI - Linux - ${{ matrix.compiler }}
@@ -32,6 +35,11 @@ jobs:
3235
strategy:
3336
matrix:
3437
include:
38+
- compiler: ghc-9.14.0.20251104
39+
compilerKind: ghc
40+
compilerVersion: 9.14.0.20251104
41+
setup-method: ghcup-prerelease
42+
allow-failure: false
3543
- compiler: ghc-9.12.2
3644
compilerKind: ghc
3745
compilerVersion: 9.12.2
@@ -101,6 +109,21 @@ jobs:
101109
HCKIND: ${{ matrix.compilerKind }}
102110
HCNAME: ${{ matrix.compiler }}
103111
HCVER: ${{ matrix.compilerVersion }}
112+
- name: Install GHC (GHCup prerelease)
113+
if: matrix.setup-method == 'ghcup-prerelease'
114+
run: |
115+
"$HOME/.ghcup/bin/ghcup" config add-release-channel prereleases
116+
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
117+
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
118+
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
119+
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
120+
echo "HC=$HC" >> "$GITHUB_ENV"
121+
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
122+
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
123+
env:
124+
HCKIND: ${{ matrix.compilerKind }}
125+
HCNAME: ${{ matrix.compiler }}
126+
HCVER: ${{ matrix.compilerVersion }}
104127
- name: Set PATH and environment variables
105128
run: |
106129
echo "$HOME/.cabal/bin" >> $GITHUB_PATH
@@ -171,7 +194,7 @@ jobs:
171194
chmod a+x $HOME/.cabal/bin/cabal-docspec
172195
cabal-docspec --version
173196
- name: checkout
174-
uses: actions/checkout@v4
197+
uses: actions/checkout@v5
175198
with:
176199
path: source
177200
- name: initial cabal.project for sdist
@@ -238,6 +261,29 @@ jobs:
238261
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo "package beam-large-records" >> cabal.project ; fi
239262
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo " ghc-options: -Werror=incomplete-patterns -Werror=incomplete-uni-patterns" >> cabal.project ; fi
240263
cat >> cabal.project <<EOF
264+
allow-newer: primitive-0.9.1.0:base
265+
allow-newer: primitive-0.9.1.0:template-haskell
266+
allow-newer: indexed-traversable-0.1.4:base
267+
allow-newer: finite-typelits-0.2.1.0:base
268+
allow-newer: finite-typelits-0.2.1.0:template-haskell
269+
allow-newer: bifunctors-5.6.2:template-haskell
270+
allow-newer: th-abstraction-0.7.1.0:template-haskell
271+
allow-newer: assoc-1.1.1:base
272+
allow-newer: vector-0.13.2.0:base
273+
allow-newer: vector-stream-0.1.0.1:base
274+
allow-newer: splitmix-0.1.3.1:base
275+
allow-newer: tagged-0.8.9:template-haskell
276+
allow-newer: scientific-0.3.8.0:base
277+
allow-newer: scientific-0.3.8.0:template-haskell
278+
allow-newer: integer-logarithms-1.0.4:base
279+
allow-newer: integer-logarithms-1.0.4:ghc-bignum
280+
allow-newer: *:base
281+
allow-newer: *:template-haskell
282+
allow-newer: *:ghc-bignum
283+
allow-newer: *:containers
284+
allow-newer: *:time
285+
allow-newer: ghc-tcplugin-api-0.17.0.0:ghc
286+
241287
package typelet
242288
ghc-options: -Werror
243289

beam-large-records/beam-large-records.cabal

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ tested-with: GHC ==8.10.7
1919
GHC ==9.8.4
2020
GHC ==9.10.2
2121
GHC ==9.12.2
22+
GHC ==9.14.1
2223

2324
source-repository head
2425
type: git
@@ -40,7 +41,7 @@ library
4041
build-depends:
4142
-- lower bound on beam-core is necessary
4243
-- see https://github.com/haskell-beam/beam/issues/585
43-
base >= 4.14 && < 4.23
44+
base >= 4.14 && < 4.24
4445
, beam-core >= 0.10.3.0 && < 0.11
4546
, large-generics >= 0.2 && < 0.3
4647
, microlens >= 0.4 && < 0.5

cabal.haskell-ci

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,6 @@ constraint-set rdp
1717
constraints: large-records +rdp
1818
tests: True
1919
run-tests: True
20+
21+
-- until dependencies catch up with GHC-9.14
22+
head-hackage: False

cabal.project

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,26 @@ package beam-large-records
2525

2626
package typelet
2727
tests: True
28+
29+
allow-newer: primitive-0.9.1.0:base
30+
allow-newer: primitive-0.9.1.0:template-haskell
31+
allow-newer: indexed-traversable-0.1.4:base
32+
allow-newer: finite-typelits-0.2.1.0:base
33+
allow-newer: finite-typelits-0.2.1.0:template-haskell
34+
allow-newer: bifunctors-5.6.2:template-haskell
35+
allow-newer: th-abstraction-0.7.1.0:template-haskell
36+
allow-newer: assoc-1.1.1:base
37+
allow-newer: vector-0.13.2.0:base
38+
allow-newer: vector-stream-0.1.0.1:base
39+
allow-newer: splitmix-0.1.3.1:base
40+
allow-newer: tagged-0.8.9:template-haskell
41+
allow-newer: scientific-0.3.8.0:base
42+
allow-newer: scientific-0.3.8.0:template-haskell
43+
allow-newer: integer-logarithms-1.0.4:base
44+
allow-newer: integer-logarithms-1.0.4:ghc-bignum
45+
allow-newer: *:base
46+
allow-newer: *:template-haskell
47+
allow-newer: *:ghc-bignum
48+
allow-newer: *:containers
49+
allow-newer: *:time
50+
allow-newer: ghc-tcplugin-api-0.17.0.0:ghc

large-anon/large-anon.cabal

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ tested-with: GHC ==8.10.7
2020
GHC ==9.8.4
2121
GHC ==9.10.2
2222
GHC ==9.12.2
23+
GHC ==9.14.1
2324

2425
library
2526
exposed-modules:
@@ -77,10 +78,10 @@ library
7778

7879
build-depends:
7980
, aeson >= 1.4.4 && < 2.3
80-
, base >= 4.14 && < 4.22
81+
, base >= 4.14 && < 4.23
8182
, containers >= 0.6.2 && < 0.9
8283
, deepseq >= 1.4.4 && < 1.6
83-
, ghc >= 8.10 && < 9.13
84+
, ghc >= 8.10 && < 9.15
8485
, ghc-tcplugin-api >= 0.17.1.0 && < 0.18
8586
, hashable >= 1.3 && < 1.6
8687
, mtl >= 2.2.1 && < 2.4

large-anon/src/Data/Record/Anon/Internal/Plugin/Source/GhcShim.hs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,9 @@ importDecl qualified name = reLocA $ noLoc $ ImportDecl {
256256
#endif
257257
#if __GLASGOW_HASKELL__ >= 906
258258
, ideclImportList = Nothing
259+
#endif
260+
#if __GLASGOW_HASKELL__ >= 914
261+
, ideclLevelSpec = NotLevelled
259262
#endif
260263
}
261264

@@ -294,7 +297,11 @@ issueWarning l errMsg = do
294297
(initPrintConfig dynFlags)
295298
(initDiagOpts dynFlags)
296299

300+
#if __GLASGOW_HASKELL__ >= 914
301+
let msg :: Err.UnknownDiagnostic opts Err.GhcHint
302+
#else
297303
let msg :: Err.UnknownDiagnostic opts
304+
#endif
298305
msg = Err.mkSimpleUnknownDiagnostic $
299306
mkPlainError [] errMsg
300307
#endif

large-anon/src/Data/Record/Anon/Overloading.hs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{-# LANGUAGE CPP #-}
12
{-# LANGUAGE PolyKinds #-}
23
{-# LANGUAGE ScopedTypeVariables #-}
34
{-# LANGUAGE TypeApplications #-}
@@ -41,5 +42,11 @@ import qualified GHC.Records.Compat
4142
ifThenElse :: Bool -> a -> a -> a
4243
ifThenElse b x y = if b then x else y
4344

45+
-- | NOTE: the order of arguments is GHC version dependent.
46+
#if __GLASGOW_HASKELL__ >=914
47+
setField :: forall x r a. GHC.Records.Compat.HasField x r a => a -> r -> r
48+
setField = flip (fst . GHC.Records.Compat.hasField @x)
49+
#else
4450
setField :: forall x r a. GHC.Records.Compat.HasField x r a => r -> a -> r
4551
setField = fst . GHC.Records.Compat.hasField @x
52+
#endif

large-generics/large-generics.cabal

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ tested-with: GHC ==8.10.7
2121
GHC ==9.8.4
2222
GHC ==9.10.2
2323
GHC ==9.12.2
24+
GHC ==9.14.1
2425

2526
library
2627
exposed-modules:

large-records/large-records.cabal

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ tested-with: GHC ==8.10.7
2424
GHC ==9.8.4
2525
GHC ==9.10.2
2626
GHC ==9.12.2
27+
GHC ==9.14.1
2728

2829
source-repository head
2930
type: git
@@ -55,14 +56,14 @@ library
5556
Data.Record.Internal.Plugin.Record
5657

5758
build-depends:
58-
, base >= 4.14 && < 4.22
59+
, base >= 4.14 && < 4.23
5960
, containers >= 0.6.2 && < 0.9
60-
, ghc >= 8.10 && < 9.13
61+
, ghc >= 8.10 && < 9.15
6162
, mtl >= 2.2.1 && < 2.4
6263
, primitive >= 0.7.3 && < 0.10
6364
, record-hasfield >= 1.0 && < 1.1
6465
, syb >= 0.7 && < 0.8
65-
, template-haskell >= 2.16 && < 2.24
66+
, template-haskell >= 2.16 && < 2.25
6667

6768
-- large-generics 0.2 starts using 'SmallArray' instead of 'Vector'
6869
, large-generics >= 0.2 && < 0.3

0 commit comments

Comments
 (0)