Commit 7221ad70 authored by Edward Z. Yang's avatar Edward Z. Yang
Browse files

GHC doesn't have a way to ask for user-package-db, so Cabal reimplemented it.

Signed-off-by: default avatarEdward Z. Yang <>

Test Plan: docs only

Reviewers: austin, bgamari

Subscribers: thomie

Differential Revision:
parent 6c9258de
......@@ -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).
......@@ -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"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment