Skip to content

Commit

Permalink
Minor refactor: spell out max supported GHC once
Browse files Browse the repository at this point in the history
  • Loading branch information
ulysses4ever authored Dec 22, 2024
1 parent 5ec4dd1 commit d24d38f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Cabal/src/Distribution/Simple/GHC.hs
Original file line number Diff line number Diff line change
Expand Up @@ -163,14 +163,15 @@ configure verbosity hcPath hcPkgPath conf0 = do
(userMaybeSpecifyPath "ghc" hcPath conf0)
let implInfo = ghcVersionImplInfo ghcVersion

-- Cabal currently supports ghc >= 7.0.1 && < 9.12
-- Cabal currently supports GHC up to `maxGhcVersion`
-- ... and the following odd development version
unless (ghcVersion < mkVersion [9, 12]) $
let maxGhcVersion = mkVersion [9, 14]
unless (ghcVersion < maxGhcVersion) $
warn verbosity $
"Unknown/unsupported 'ghc' version detected "
++ "(Cabal "
++ prettyShow cabalVersion
++ " supports 'ghc' version < 9.12): "
++ " supports 'ghc' version < " ++ prettyShow maxGhcVersion ++ "): "
++ programPath ghcProg
++ " is version "
++ prettyShow ghcVersion
Expand Down

0 comments on commit d24d38f

Please sign in to comment.