Skip to content

Commit

Permalink
Support GHC 9.8 in cabal 3.10.2.0 (#9225)
Browse files Browse the repository at this point in the history
Co-authored-by: Ben Gamari <ben@smart-cactus.org>
  • Loading branch information
Kleidukos and bgamari authored Sep 5, 2023
1 parent 1714b07 commit 3b74b68
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Cabal/src/Distribution/Simple/GHC.hs
Original file line number Diff line number Diff line change
Expand Up @@ -140,12 +140,12 @@ configure verbosity hcPath hcPkgPath conf0 = do
(userMaybeSpecifyPath "ghc" hcPath conf0)
let implInfo = ghcVersionImplInfo ghcVersion

-- Cabal currently supports ghc >= 7.0.1 && < 9.8
-- Cabal currently supports ghc >= 7.0.1 && < 9.10
-- ... and the following odd development version
unless (ghcVersion < mkVersion [9,8]) $
unless (ghcVersion < mkVersion [9,10]) $
warn verbosity $
"Unknown/unsupported 'ghc' version detected "
++ "(Cabal " ++ prettyShow cabalVersion ++ " supports 'ghc' version < 9.8): "
++ "(Cabal " ++ prettyShow cabalVersion ++ " supports 'ghc' version < 9.10): "
++ programPath ghcProg ++ " is version " ++ prettyShow ghcVersion

-- This is slightly tricky, we have to configure ghc first, then we use the
Expand Down
1 change: 1 addition & 0 deletions cabal-install/src/Distribution/Client/ProjectPlanning.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1218,6 +1218,7 @@ planPackages verbosity comp platform solver SolverSettings{..}
-- TODO: long-term, this compatibility matrix should be
-- stored as a field inside 'Distribution.Compiler.Compiler'
setupMinCabalVersionConstraint
| isGHC, compVer >= mkVersion [9,8] = mkVersion [3,10,2]
| isGHC, compVer >= mkVersion [9,6] = mkVersion [3,10]
| isGHC, compVer >= mkVersion [9,4] = mkVersion [3,8]
| isGHC, compVer >= mkVersion [9,2] = mkVersion [3,6]
Expand Down

0 comments on commit 3b74b68

Please sign in to comment.