diff options
author | Daniel Gröber <dxld@darkboxed.org> | 2019-07-30 16:37:01 +0200 |
---|---|---|
committer | Daniel Gröber (dxld) <dxld@darkboxed.org> | 2019-09-17 17:48:26 +0200 |
commit | 6b847c923ec62d18e99a30858efc3506cee32dca (patch) | |
tree | 174e8f79211bc2c6aba1f642a464f73425ee4d19 | |
parent | f29e10402d7cba68264f06d8644712e189e17142 (diff) |
ghc-session: Add GHC version match check
-rw-r--r-- | tests/GhcSession.hs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/GhcSession.hs b/tests/GhcSession.hs index 22b94b4..6816e02 100644 --- a/tests/GhcSession.hs +++ b/tests/GhcSession.hs @@ -9,6 +9,7 @@ module Main where import GHC +import Config import GHC.Paths (libdir) import Outputable import DynFlags @@ -111,10 +112,14 @@ main = do putStrLn $ "cabal-install version: " ++ showVersion ci_ver putStrLn $ "cabal-install builtin Cabal version: " ++ showEsrVer (f_c_ver V1) - putStrLn $ "GHC version: " ++ showVersion g_ver + putStrLn $ "GHC executable version: " ++ showVersion g_ver + putStrLn $ "GHC library version: " ++ cProjectVersion putStrLn $ "Stack version: " ++ showVersion s_ver putStrLn $ "Stack Cabal version: " ++ showEsrVer (f_c_ver Stack) + when (cProjectVersion /= showVersion g_ver) $ + error "GHC version mismatch! See above." + let proj_impls :: [(ProjType, ProjSetup0)] proj_impls = [ (V2, newBuildProjSetup) |