Skip to content

Commit 410f871

Browse files
authored
Merge pull request #8420 from ulysses4ever/adopt-ghc-9.4.1
Support GHC 9.4
2 parents 769129c + 5f905a9 commit 410f871

File tree

27 files changed

+81
-23
lines changed

27 files changed

+81
-23
lines changed

.github/workflows/validate.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
strategy:
3939
matrix:
4040
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
41-
ghc: ["9.2.3", "9.0.2", "8.10.7", "8.8.4", "8.6.5", "8.4.4"]
41+
ghc: ["9.4.2", "9.2.3", "9.0.2", "8.10.7", "8.8.4", "8.6.5", "8.4.4"]
4242
exclude:
4343
# corrupts GHA cache or the fabric of reality itself, see https://github.com/haskell/cabal/issues/8356
4444
- os: "windows-latest"
@@ -61,7 +61,7 @@ jobs:
6161
id: setup-haskell
6262
with:
6363
ghc-version: ${{ matrix.ghc }}
64-
cabal-version: latest # default, keeping for visibility
64+
cabal-version: '3.8.1.0'
6565

6666
# See the following link for a breakdown of the following step
6767
# https://github.com/haskell/actions/issues/7#issuecomment-745697160
@@ -212,6 +212,7 @@ jobs:
212212
id: setup-haskell
213213
with:
214214
ghc-version: ${{ matrix.ghc }}
215+
cabal-version: '3.8.1.0'
215216

216217
# As we are reusing the cached build dir from the previous step
217218
# the generated artifacts are available here,

cabal-install-solver/cabal-install-solver.cabal

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ library
105105

106106
build-depends:
107107
, array >=0.4 && <0.6
108-
, base >=4.10 && <4.17
108+
, base >=4.10 && <4.18
109109
, bytestring >=0.10.6.0 && <0.12
110110
, Cabal ^>=3.9
111111
, Cabal-syntax ^>=3.9
@@ -138,7 +138,7 @@ Test-Suite unit-tests
138138
UnitTests.Distribution.Solver.Modular.MessageUtils
139139

140140
build-depends:
141-
, base >= 4.10 && <4.17
141+
, base >= 4.10 && <4.18
142142
, Cabal
143143
, Cabal-syntax
144144
, cabal-install-solver

cabal-install/cabal-install.cabal

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ common warnings
4646
ghc-options: -Wunused-packages
4747

4848
common base-dep
49-
build-depends: base >=4.10 && <4.17
49+
build-depends: base >=4.10 && <4.18
5050

5151
common cabal-dep
5252
build-depends: Cabal ^>=3.9
@@ -60,6 +60,7 @@ common cabal-install-solver-dep
6060
library
6161
import: warnings, base-dep, cabal-dep, cabal-syntax-dep, cabal-install-solver-dep
6262
default-language: Haskell2010
63+
default-extensions: TypeOperators
6364

6465
hs-source-dirs: src
6566
exposed-modules:
@@ -272,6 +273,7 @@ executable cabal
272273
test-suite unit-tests
273274
import: warnings, base-dep, cabal-dep, cabal-syntax-dep, cabal-install-solver-dep
274275
default-language: Haskell2010
276+
default-extensions: TypeOperators
275277
ghc-options: -rtsopts -threaded
276278

277279
type: exitcode-stdio-1.0

cabal-testsuite/PackageTests/Backpack/Includes2/setup-external.test.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import Test.Cabal.Prelude
22
main = setupAndCabalTest $ do
33
skipUnlessGhcVersion ">= 8.1"
4-
ghc <- isGhcVersion "== 9.0.2 || == 9.2.*"
4+
ghc <- isGhcVersion "== 9.0.2 || == 9.2.* || == 9.4.*"
55
expectBrokenIf ghc 7987 $ do
66
withPackageDb $ do
77
withDirectory "mylib" $ setup_install_with_docs ["--ipid", "mylib-0.1.0.0"]

cabal-testsuite/PackageTests/Backpack/Includes2/setup-per-component.test.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import Test.Cabal.Prelude
22
main = setupTest $ do
33
-- No cabal test because per-component is broken with it
44
skipUnlessGhcVersion ">= 8.1"
5-
ghc <- isGhcVersion "== 9.0.2 || == 9.2.*"
5+
ghc <- isGhcVersion "== 9.0.2 || == 9.2.* || == 9.4.*"
66
expectBrokenIf ghc 7987 $
77
withPackageDb $ do
88
let setup_install' args = setup_install_with_docs (["--cabal-file", "Includes2.cabal"] ++ args)

cabal-testsuite/PackageTests/Backpack/Includes3/setup-external-ok.test.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import Data.List
33
import qualified Data.Char as Char
44
main = setupAndCabalTest $ do
55
skipUnlessGhcVersion ">= 8.1"
6-
ghc <- isGhcVersion "== 9.0.2 || == 9.2.*"
6+
ghc <- isGhcVersion "== 9.0.2 || == 9.2.* || == 9.4.*"
77
expectBrokenIf ghc 7987 $
88
withPackageDb $ do
99
containers_id <- getIPID "containers"

cabal-testsuite/PackageTests/CCompilerOverride/setup.test.hs

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,16 @@ import Test.Cabal.Prelude
66
main = setupAndCabalTest $ do
77
skipUnlessGhcVersion ">= 8.8"
88
isWin <- isWindows
9+
ghc94 <- isGhcVersion "== 9.4.*"
910
env <- getTestEnv
1011
let pwd = testCurrentDir env
1112
customCC = pwd ++ "/custom-cc" ++ if isWin then ".bat" else ""
1213

13-
setup "configure"
14-
[ "--ghc-option=-DNOERROR1"
15-
, "--ghc-option=-optc=-DNOERROR2"
16-
, "--ghc-option=-optP=-DNOERROR3"
17-
, "--with-gcc=" ++ customCC
18-
]
19-
setup "build" ["-v2"]
14+
expectBrokenIf (isWin && ghc94) 8451 $ do
15+
setup "configure"
16+
[ "--ghc-option=-DNOERROR1"
17+
, "--ghc-option=-optc=-DNOERROR2"
18+
, "--ghc-option=-optP=-DNOERROR3"
19+
, "--with-gcc=" ++ customCC
20+
]
21+
setup "build" ["-v2"]

cabal-testsuite/PackageTests/CustomPreProcess/cabal.test.hs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
import Test.Cabal.Prelude
22
-- Test internal custom preprocessor
33
main = cabalTest $ do
4+
isWin <- isWindows
5+
ghc94 <- isGhcVersion "== 9.4.*"
6+
expectBrokenIf (isWin && ghc94) 8451 $ do
47
skipUnless "no Cabal for GHC" =<< hasCabalForGhc
58

69
-- old Cabal's ./Setup.hs output is difficult to normalise
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
import Test.Cabal.Prelude
22
main = cabalTest $ do
3+
isWin <- isWindows
4+
ghc94 <- isGhcVersion "== 9.4.*"
5+
expectBrokenIf (isWin && ghc94) 8451 $ do
36
cabal "v2-build" ["foreign-opts-c-exe"]
47
withPlan $ runPlanExe "foreign-opts-c" "foreign-opts-c-exe" []
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
import Test.Cabal.Prelude
22
main = cabalTest $ do
3+
isWin <- isWindows
4+
ghc94 <- isGhcVersion "== 9.4.*"
5+
expectBrokenIf (isWin && ghc94) 8451 $ do
36
cabal "v2-build" ["foreign-opts-cxx-exe"]
47
withPlan $ runPlanExe "foreign-opts-cxx" "foreign-opts-cxx-exe" []

0 commit comments

Comments
 (0)