@@ -667,7 +667,7 @@ setupEnv needTargets boptsCLI mResolveMissingGHC = do
667667 }
668668
669669 (compilerPaths, ghcBin) <- ensureCompilerAndMsys sopts
670- let compilerVer = compilerPaths. cpCompilerVersion
670+ let compilerVer = compilerPaths. compilerVersion
671671
672672 -- Modify the initial environment to include the GHC path, if a local GHC
673673 -- is being used
@@ -712,12 +712,12 @@ setupEnv needTargets boptsCLI mResolveMissingGHC = do
712712 either throwM pure $ augmentPath (toFilePath <$> mkDirs True ) mpath
713713
714714 deps <- runRIO envConfig0 packageDatabaseDeps
715- runWithGHC menv compilerPaths $ createDatabase compilerPaths. cpPkg deps
715+ runWithGHC menv compilerPaths $ createDatabase compilerPaths. pkg deps
716716 localdb <- runRIO envConfig0 packageDatabaseLocal
717- runWithGHC menv compilerPaths $ createDatabase compilerPaths. cpPkg localdb
717+ runWithGHC menv compilerPaths $ createDatabase compilerPaths. pkg localdb
718718 extras <- runReaderT packageDatabaseExtra envConfig0
719719 let mkGPP locals =
720- mkGhcPackagePath locals localdb deps extras compilerPaths. cpGlobalDB
720+ mkGhcPackagePath locals localdb deps extras compilerPaths. globalDB
721721
722722 distDir <- runReaderT distRelativeDir envConfig0 >>= canonicalizePath
723723
@@ -788,7 +788,7 @@ setupEnv needTargets boptsCLI mResolveMissingGHC = do
788788 -- are ignored, since we're setting up our
789789 -- own package databases. See
790790 -- https://github.com/commercialhaskell/stack/issues/4706
791- $ (case compilerPaths. cpCompilerVersion of
791+ $ (case compilerPaths. compilerVersion of
792792 ACGhc version | version >= mkVersion [8 , 4 , 4 ] ->
793793 Map. insert " GHC_ENVIRONMENT" " -"
794794 _ -> id )
@@ -1052,8 +1052,8 @@ warnUnsupportedCompilerCabal ::
10521052 -> RIO env ()
10531053warnUnsupportedCompilerCabal cp didWarn = do
10541054 unless didWarn $
1055- void $ warnUnsupportedCompiler $ getGhcVersion cp. cpCompilerVersion
1056- let cabalVersion = cp. cpCabalVersion
1055+ void $ warnUnsupportedCompiler $ getGhcVersion cp. compilerVersion
1056+ let cabalVersion = cp. cabalVersion
10571057 notifyIfCabalUntested <- view $ configL . to (. notifyIfCabalUntested)
10581058 if
10591059 | cabalVersion < mkVersion [1 , 24 , 0 ] -> do
@@ -1222,9 +1222,9 @@ ensureCompiler sopts getSetupInfo' = do
12221222
12231223 let canUseCompiler cp
12241224 | sopts. skipGhcCheck = pure cp
1225- | not $ isWanted cp. cpCompilerVersion =
1225+ | not $ isWanted cp. compilerVersion =
12261226 prettyThrowIO UnwantedCompilerVersion
1227- | cp. cpArch /= expectedArch = prettyThrowIO UnwantedArchitecture
1227+ | cp. arch /= expectedArch = prettyThrowIO UnwantedArchitecture
12281228 | otherwise = pure cp
12291229 isWanted =
12301230 isWantedCompiler sopts. compilerCheck sopts. wantedCompiler
@@ -1259,7 +1259,7 @@ ensureCompiler sopts getSetupInfo' = do
12591259 Nothing -> ensureSandboxedCompiler sopts getSetupInfo'
12601260 Just cp -> do
12611261 let paths = ExtraDirs
1262- { edBins = [parent cp. cpCompiler ]
1262+ { edBins = [parent cp. compiler ]
12631263 , edInclude = [] , edLib = []
12641264 }
12651265 pure (cp, paths)
@@ -1504,18 +1504,18 @@ pathsFromCompiler wc compilerBuild isSandboxed compiler =
15041504 Just dp -> pure $ pkgVersion dp. packageIdent
15051505
15061506 pure CompilerPaths
1507- { cpBuild = compilerBuild
1508- , cpArch = arch
1509- , cpSandboxed = isSandboxed
1510- , cpCompilerVersion = compilerVer
1511- , cpCompiler = compiler
1512- , cpPkg = pkg
1513- , cpInterpreter = interpreter
1514- , cpHaddock = haddock
1515- , cpCabalVersion = cabalPkgVer
1516- , cpGlobalDB = globaldb
1517- , cpGhcInfo = infobs
1518- , cpGlobalDump = globalDump
1507+ { build = compilerBuild
1508+ , arch = arch
1509+ , sandboxed = isSandboxed
1510+ , compilerVersion = compilerVer
1511+ , compiler = compiler
1512+ , pkg = pkg
1513+ , interpreter = interpreter
1514+ , haddock = haddock
1515+ , cabalVersion = cabalPkgVer
1516+ , globalDB = globaldb
1517+ , ghcInfo = infobs
1518+ , globalDump = globalDump
15191519 }
15201520 where
15211521 onErr = throwIO . PrettyException . InvalidGhcAt compiler
0 commit comments