summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--compiler/main/DynFlags.hs2
-rw-r--r--compiler/main/Packages.hs3
2 files changed, 5 insertions, 0 deletions
diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs
index 5b16bd69b0..e443926d0f 100644
--- a/compiler/main/DynFlags.hs
+++ b/compiler/main/DynFlags.hs
@@ -973,6 +973,8 @@ versionedAppDir :: DynFlags -> IO FilePath
versionedAppDir dflags = do
appdir <- getAppUserDataDirectory (programName dflags)
return $ appdir </> (TARGET_ARCH ++ '-':TARGET_OS ++ '-':projectVersion dflags)
+ -- NB: This functionality is reimplemented in Cabal, so if you
+ -- change it, be sure to update Cabal.
-- | The target code type of the compilation (if any).
--
diff --git a/compiler/main/Packages.hs b/compiler/main/Packages.hs
index 8d0f2a67aa..a26b275bb3 100644
--- a/compiler/main/Packages.hs
+++ b/compiler/main/Packages.hs
@@ -378,6 +378,9 @@ getPackageConfRefs dflags = do
resolvePackageConfig :: DynFlags -> PkgConfRef -> IO (Maybe FilePath)
resolvePackageConfig dflags GlobalPkgConf = return $ Just (systemPackageConfig dflags)
+-- NB: This logic is reimplemented in Cabal, so if you change it,
+-- make sure you update Cabal. (Or, better yet, dump it in the
+-- compiler info so Cabal can use the info.)
resolvePackageConfig dflags UserPkgConf = handleIO (\_ -> return Nothing) $ do
dir <- versionedAppDir dflags
let pkgconf = dir </> "package.conf.d"