Skip to content

Commit 3bbc15a

Browse files
authored
Minor refactor: spell out max supported GHC once (haskell#10663)
* Minor refactor: spell out max supported GHC once * fixup!
1 parent 5ad146c commit 3bbc15a

File tree

1 file changed

+6
-4
lines changed
  • Cabal/src/Distribution/Simple

1 file changed

+6
-4
lines changed

Cabal/src/Distribution/Simple/GHC.hs

+6-4
Original file line numberDiff line numberDiff line change
@@ -163,14 +163,16 @@ configure verbosity hcPath hcPkgPath conf0 = do
163163
(userMaybeSpecifyPath "ghc" hcPath conf0)
164164
let implInfo = ghcVersionImplInfo ghcVersion
165165

166-
-- Cabal currently supports ghc >= 7.0.1 && < 9.14
167-
-- ... and the following odd development version
168-
unless (ghcVersion < mkVersion [9, 14]) $
166+
-- Cabal currently supports GHC less than `maxGhcVersion`
167+
let maxGhcVersion = mkVersion [9, 14]
168+
unless (ghcVersion < maxGhcVersion) $
169169
warn verbosity $
170170
"Unknown/unsupported 'ghc' version detected "
171171
++ "(Cabal "
172172
++ prettyShow cabalVersion
173-
++ " supports 'ghc' version < 9.14): "
173+
++ " supports 'ghc' version < "
174+
++ prettyShow maxGhcVersion
175+
++ "): "
174176
++ programPath ghcProg
175177
++ " is version "
176178
++ prettyShow ghcVersion

0 commit comments

Comments
 (0)