Skip to content

Commit

Permalink
Emit warning when an unknown GHC version is encountered
Browse files Browse the repository at this point in the history
This finally addresses the long-standing ticket haskell#415
  • Loading branch information
hvr committed Feb 23, 2018
1 parent 49da992 commit 5339b36
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Cabal/Distribution/Simple/GHC.hs
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,13 @@ configure verbosity hcPath hcPkgPath conf0 = do
(userMaybeSpecifyPath "ghc" hcPath conf0)
let implInfo = ghcVersionImplInfo ghcVersion

-- Cabal 2.2 supports ghc >= 6.11 && < 8.5
unless (ghcVersion < mkVersion [8,5]) $
warn verbosity $
"Unknown/unsupported 'ghc' version detected "
++ "(Cabal " ++ display cabalVersion ++ " supports 'ghc' version < 8.5): "
++ programPath ghcProg ++ " is version " ++ display ghcVersion

-- This is slightly tricky, we have to configure ghc first, then we use the
-- location of ghc to help find ghc-pkg in the case that the user did not
-- specify the location of ghc-pkg directly:
Expand Down

0 comments on commit 5339b36

Please sign in to comment.