Skip to content

Commit d18b818

Browse files
ghc-9.12.3 (#625)
* pass -XGHC2024 for newer builds * ghc-9.14.1 released * ghc-9.12.3 released
1 parent 6d28969 commit d18b818

File tree

5 files changed

+35
-13
lines changed

5 files changed

+35
-13
lines changed

CI.hs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ data GhcFlavor
5050
= Da DaFlavor
5151
| GhcMaster String
5252
| Ghc9141
53+
| Ghc9123
5354
| Ghc9122
5455
| Ghc9121
5556
| Ghc9103
@@ -109,11 +110,12 @@ data DaFlavor = DaFlavor
109110

110111
-- Last tested gitlab.haskell.org/ghc/ghc.git at
111112
current :: String
112-
current = "129ce32d3a4f2601f5c2d1bbaeeb2fbaf8dc9ef9" -- 2025-10-09
113+
current = "7b9c20f4c3c82a534d22bb56e6bebf2ec0491a82" -- 2025-12-28
113114

114115
ghcFlavorOpt :: GhcFlavor -> String
115116
ghcFlavorOpt = \case
116117
Ghc9141 -> "--ghc-flavor ghc-9.14.1"
118+
Ghc9123 -> "--ghc-flavor ghc-9.12.3"
117119
Ghc9122 -> "--ghc-flavor ghc-9.12.2"
118120
Ghc9121 -> "--ghc-flavor ghc-9.12.1"
119121
Ghc9103 -> "--ghc-flavor ghc-9.10.3"
@@ -185,6 +187,7 @@ genVersionStr flavor suffix =
185187
Da {} -> "8.8.1"
186188
GhcMaster _ -> "0"
187189
Ghc9141 -> "9.14.1"
190+
Ghc9123 -> "9.12.3"
188191
Ghc9122 -> "9.12.2"
189192
Ghc9121 -> "9.12.1"
190193
Ghc9103 -> "9.10.3"
@@ -261,6 +264,7 @@ parseOptions =
261264
readFlavor :: Opts.ReadM GhcFlavor
262265
readFlavor = Opts.eitherReader $ \case
263266
"ghc-9.14.1" -> Right Ghc9141
267+
"ghc-9.12.3" -> Right Ghc9123
264268
"ghc-9.12.2" -> Right Ghc9122
265269
"ghc-9.12.1" -> Right Ghc9121
266270
"ghc-9.10.3" -> Right Ghc9103
@@ -558,7 +562,8 @@ buildDists ghcFlavor noGhcCheckout noBuilds versionSuffix allowNewerFlags allowN
558562

559563
branch :: GhcFlavor -> String
560564
branch = \case
561-
Ghc9141 -> "ghc-9.14"
565+
Ghc9141 -> "ghc-9.14.1-release"
566+
Ghc9123 -> "ghc-9.12.3-release"
562567
Ghc9122 -> "ghc-9.12.2-release"
563568
Ghc9121 -> "ghc-9.12.1-release"
564569
Ghc9103 -> "ghc-9.10.3-release"

examples/ghc-lib-test-utils/src/TestUtils.hs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ data GhcVersion
6666
| Ghc9103
6767
| Ghc9121
6868
| Ghc9122
69+
| Ghc9123
6970
| Ghc9141
7071
| GhcMaster
7172
deriving (Eq, Ord, Typeable)
@@ -79,6 +80,7 @@ instance Show GhcVersion where
7980
showGhcVersion :: GhcVersion -> String
8081
showGhcVersion = \case
8182
Ghc9141 -> "ghc-9.14.1"
83+
Ghc9123 -> "ghc-9.12.3"
8284
Ghc9122 -> "ghc-9.12.2"
8385
Ghc9121 -> "ghc-9.12.1"
8486
Ghc9103 -> "ghc-9.10.3"
@@ -142,6 +144,7 @@ readFlavor =
142144
-- ghc-9.14
143145
"ghc-9.14.1" -> Just Ghc9141
144146
-- ghc-9.12
147+
"ghc-9.12.3" -> Just Ghc9123
145148
"ghc-9.12.2" -> Just Ghc9122
146149
"ghc-9.12.1" -> Just Ghc9121
147150
-- ghc-9.10

ghc-lib-gen/src/Ghclibgen.hs

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,8 @@ ghcLibParserHsSrcDirs forDepends ghcFlavor lib =
142142
GHC_8_8 -> ["compiler/codeGen", "compiler/hieFile", "compile/llvmGen", "compiler/stranal", "compiler/rename", "compiler/stgSyn", "compiler/llvmGen"]
143143
GHC_8_10 -> ["compiler/nativeGen", "compiler/deSugar", "compiler/hieFile", "compiler/llvmGen", "compiler/stranal", "compiler/rename", "compiler/stgSyn"]
144144
GHC_9_10 -> ["libraries/ghc-internal/src"]
145+
GHC_9_12 -> ["utils/ghc-toolchain/src" | ghcFlavor >= Ghc9123]
146+
GHC_9_14 -> ["utils/ghc-toolchain/src"]
145147
_ -> []
146148
in sortDiffListByLength all $ Set.fromList [dir | not forDepends, dir <- exclusions]
147149

@@ -159,9 +161,9 @@ ghcLibHsSrcDirs forDepends ghcFlavor lib =
159161
GHC_9_6 -> ["libraries/template-haskell", "libraries/ghc-boot-th", "libraries/ghc-boot", "libraries/ghc-heap", "libraries/ghci"]
160162
GHC_9_8 -> ["libraries/template-haskell", "libraries/ghc-boot-th", "libraries/ghc-boot", "libraries/ghc-heap", "libraries/ghc-platform/src", "libraries/ghc-platform"]
161163
GHC_9_10 -> ["libraries/template-haskell", "libraries/ghc-boot-th", "libraries/ghc-boot", "libraries/ghc-heap", "libraries/ghc-platform/src", "libraries/ghc-platform", "libraries/ghci", "libraries/ghc-internal/src"]
162-
GHC_9_12 -> ["libraries/template-haskell", "libraries/ghc-boot-th", "libraries/ghc-boot", "libraries/ghc-heap", "libraries/ghc-platform/src", "libraries/ghc-platform", "libraries/ghci"]
163-
GHC_9_14 -> ["libraries/template-haskell", "libraries/ghc-boot-th", "libraries/ghc-boot", "", "libraries/ghc-heap", "libraries/ghc-platform/src", "libraries/ghc-platform", "libraries/ghci"]
164-
GHC_9_16 -> ["libraries/template-haskell", "libraries/ghc-boot-th", "libraries/ghc-boot", "", "libraries/ghc-heap", "libraries/ghc-platform/src", "libraries/ghc-platform", "libraries/ghci", "libraries/ghc-internal"]
164+
GHC_9_12 -> ["libraries/template-haskell", "libraries/ghc-boot-th", "libraries/ghc-boot", "libraries/ghc-heap", "libraries/ghc-platform/src", "libraries/ghc-platform", "libraries/ghci"] ++ [x | x <- ["libraries/ghc-internal/src", "utils/ghc-toolchain/src"], ghcFlavor >= Ghc9123]
165+
GHC_9_14 -> ["libraries/template-haskell", "libraries/ghc-boot-th", "libraries/ghc-boot", "", "libraries/ghc-heap", "libraries/ghc-platform/src", "libraries/ghc-platform", "libraries/ghci", "libraries/ghc-internal/src", "utils/ghc-toolchain/src"]
166+
GHC_9_16 -> ["libraries/template-haskell", "libraries/ghc-boot-th", "libraries/ghc-boot", "", "libraries/ghc-heap", "libraries/ghc-platform/src", "libraries/ghc-platform", "libraries/ghci", "libraries/ghc-internal", "libraries/ghc-internal/src", "utils/ghc-toolchain/src"]
165167
in sortDiffListByLength all $ Set.fromList [dir | not forDepends, dir <- exclusions]
166168

167169
-- File path constants.
@@ -354,6 +356,7 @@ calcModuleDeps includeDirs _hsSrcDirs hsSrcIncludes ghcFlavor cabalPackageDb ghc
354356
#endif
355357
["-fno-safe-haskell" | series >= GHC_9_0], -- avoid warning: [GHC-98887] -XGeneralizedNewtypeDeriving is not allowed in Safe Haskell; ignoring -XGeneralizedNewtypeDeriving
356358
["-DBIGNUM_NATIVE" | series > GHC_9_12],
359+
["-XGHC2024" | series > GHC_9_14],
357360
includeDirs,
358361
hsSrcIncludes,
359362
[placeholderModulesDir </> "Main.hs"]
@@ -1376,6 +1379,7 @@ baseBounds = \case
13761379
-- base-4.21.0.0
13771380
Ghc9121 -> "base >= 4.19 && < 4.22" -- [ghc-9.8.1, ghc-9.14.1)
13781381
Ghc9122 -> "base >= 4.19 && < 4.22" -- [ghc-9.8.1, ghc-9.14.1)
1382+
Ghc9123 -> "base >= 4.19 && < 4.22" -- [ghc-9.8.1, ghc-9.14.1)
13791383
-- base-4.21.0.0
13801384
Ghc9141 -> "base >= 4.20 && < 4.23" -- [ghc-9.10.1, ghc-9.16.1)
13811385
GhcMaster ->
@@ -1586,8 +1590,9 @@ generateGhcLibCabal ghcFlavor customCppOpts = do
15861590
" description: Pass -DTHREADED_RTS to the C toolchain"
15871591
],
15881592
["library"],
1589-
[" default-language: Haskell2010" | ghcFlavor < Ghc9101],
1590-
[" default-language: GHC2021" | ghcFlavor >= Ghc9101],
1593+
[" default-language: Haskell2010" | ghcSeries ghcFlavor < GHC_9_10],
1594+
[" default-language: GHC2021" | ghcSeries ghcFlavor >= GHC_9_10 && ghcSeries ghcFlavor < GHC_9_16],
1595+
[" default-language: GHC2024" | ghcSeries ghcFlavor >= GHC_9_16],
15911596
[ " exposed: False",
15921597
" include-dirs:"
15931598
],
@@ -1596,14 +1601,14 @@ generateGhcLibCabal ghcFlavor customCppOpts = do
15961601
" ghc-options: -fno-safe-haskell"
15971602
],
15981603
[ " if flag(threaded-rts)",
1599-
" if impl(ghc < 9.14.0)",
1604+
" if impl(ghc < 9.12.3)",
16001605
" ghc-options: -fobject-code -package=ghc-boot-th -optc-DTHREADED_RTS",
16011606
" else",
16021607
" ghc-options: -fobject-code -optc-DTHREADED_RTS",
16031608
" cc-options: -DTHREADED_RTS",
16041609
" cpp-options: -DTHREADED_RTS " ++ generateCppOpts ghcFlavor customCppOpts,
16051610
" else",
1606-
" if impl(ghc < 9.14.0)",
1611+
" if impl(ghc < 9.12.3)",
16071612
" ghc-options: -fobject-code -package=ghc-boot-th",
16081613
" else",
16091614
" ghc-options: -fobject-code",
@@ -1703,8 +1708,9 @@ generateGhcLibParserCabal ghcFlavor customCppOpts = do
17031708
" description: Pass -DTHREADED_RTS to the C toolchain"
17041709
],
17051710
["library"],
1706-
[" default-language: Haskell2010" | ghcFlavor < Ghc9101],
1707-
[" default-language: GHC2021" | ghcFlavor >= Ghc9101],
1711+
[" default-language: Haskell2010" | ghcSeries ghcFlavor < GHC_9_10],
1712+
[" default-language: GHC2021" | ghcSeries ghcFlavor >= GHC_9_10 && ghcSeries ghcFlavor < GHC_9_16],
1713+
[" default-language: GHC2024" | ghcSeries ghcFlavor >= GHC_9_16],
17081714
[ " exposed: False",
17091715
" include-dirs:"
17101716
],
@@ -1713,11 +1719,17 @@ generateGhcLibParserCabal ghcFlavor customCppOpts = do
17131719
" ghc-options: -fno-safe-haskell"
17141720
],
17151721
[ " if flag(threaded-rts)",
1716-
" ghc-options: -fobject-code -package=ghc-boot-th -optc-DTHREADED_RTS",
1722+
" if impl(ghc < 9.12.3)",
1723+
" ghc-options: -fobject-code -package=ghc-boot-th -optc-DTHREADED_RTS",
1724+
" else",
1725+
" ghc-options: -fobject-code -optc-DTHREADED_RTS",
17171726
" cc-options: -DTHREADED_RTS",
17181727
" cpp-options: -DTHREADED_RTS " ++ generateCppOpts ghcFlavor customCppOpts,
17191728
" else",
1720-
" ghc-options: -fobject-code -package=ghc-boot-th",
1729+
" if impl(ghc < 9.12.3)",
1730+
" ghc-options: -fobject-code -package=ghc-boot-th",
1731+
" else",
1732+
" ghc-options: -fobject-code",
17211733
" cpp-options: " ++ generateCppOpts ghcFlavor customCppOpts
17221734
],
17231735
[ " if !os(windows)",

ghc-lib-gen/src/GhclibgenFlavor.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ data GhcFlavor
5858
| Ghc9103
5959
| Ghc9121
6060
| Ghc9122
61+
| Ghc9123
6162
| Ghc9141
6263
| GhcMaster
6364
deriving (Show, Eq, Ord)

ghc-lib-gen/src/GhclibgenOpts.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ readFlavor = eitherReader $ \case
105105
-- ghc-9.14
106106
"ghc-9.14.1" -> Right Ghc9141
107107
-- ghc-9.12
108+
"ghc-9.12.3" -> Right Ghc9123
108109
"ghc-9.12.2" -> Right Ghc9122
109110
"ghc-9.12.1" -> Right Ghc9121
110111
-- ghc-9.10

0 commit comments

Comments
 (0)