@@ -536,6 +536,7 @@ pathCmd keys go =
536536 localroot <- installationRootLocal
537537 distDir <- distRelativeDir
538538 hpcDir <- hpcReportDir
539+ compilerPath <- getCompilerPath =<< getWhichCompiler
539540 forM_
540541 -- filter the chosen paths in flags (keys),
541542 -- or show all of them if no specific paths chosen.
@@ -561,20 +562,22 @@ pathCmd keys go =
561562 localroot
562563 distDir
563564 hpcDir
564- extra))))
565+ extra
566+ compilerPath))))
565567
566568-- | Passed to all the path printers as a source of info.
567569data PathInfo = PathInfo
568- { piBuildConfig :: BuildConfig
569- , piEnvOverride :: EnvOverride
570- , piSnapDb :: Path Abs Dir
571- , piLocalDb :: Path Abs Dir
572- , piGlobalDb :: Path Abs Dir
573- , piSnapRoot :: Path Abs Dir
574- , piLocalRoot :: Path Abs Dir
575- , piDistDir :: Path Rel Dir
576- , piHpcDir :: Path Abs Dir
577- , piExtraDbs :: [Path Abs Dir ]
570+ { piBuildConfig :: BuildConfig
571+ , piEnvOverride :: EnvOverride
572+ , piSnapDb :: Path Abs Dir
573+ , piLocalDb :: Path Abs Dir
574+ , piGlobalDb :: Path Abs Dir
575+ , piSnapRoot :: Path Abs Dir
576+ , piLocalRoot :: Path Abs Dir
577+ , piDistDir :: Path Rel Dir
578+ , piHpcDir :: Path Abs Dir
579+ , piExtraDbs :: [Path Abs Dir ]
580+ , piCompilerPath :: Path Abs File
578581 }
579582
580583-- | The paths of interest to a user. The first tuple string is used
@@ -600,9 +603,12 @@ paths =
600603 , ( " PATH environment variable"
601604 , " bin-path"
602605 , T. pack . intercalate [searchPathSeparator] . eoPath . piEnvOverride )
603- , ( " Installed GHCs (unpacked and archives) "
604- , " ghc-paths "
606+ , ( " Install location for GHC and other core tools "
607+ , " programs-path "
605608 , T. pack . toFilePathNoTrailingSep . configLocalPrograms . bcConfig . piBuildConfig )
609+ , ( " Compiler (e.g. ghc)"
610+ , " compiler-path"
611+ , T. pack . toFilePath . piCompilerPath )
606612 , ( " Local bin path where stack installs executables"
607613 , " local-bin-path"
608614 , T. pack . toFilePathNoTrailingSep . configLocalBin . bcConfig . piBuildConfig )
0 commit comments