From 73b9de253690b22f9198bd27f0b0c355e0f9ab99 Mon Sep 17 00:00:00 2001 From: Robin Krom Date: Wed, 8 May 2019 14:23:04 +0200 Subject: [PATCH] compiler: follow ghc convention and put conf files in package.conf.d dir (#978) * compiler: follow ghc convention and put conf files in package.conf.d dir We follow the ghc convention and locate all .conf files for the package database in the `package.conf.d` dir. * addressed neil's comment --- src/Development/IDE/UtilGHC.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Development/IDE/UtilGHC.hs b/src/Development/IDE/UtilGHC.hs index d70a4206..b1478f03 100644 --- a/src/Development/IDE/UtilGHC.hs +++ b/src/Development/IDE/UtilGHC.hs @@ -29,6 +29,7 @@ import qualified Packages import Platform import qualified EnumSet import Data.IORef +import System.FilePath import GHC.Generics (Generic) ---------------------------------------------------------------------- @@ -38,7 +39,7 @@ setPackageDbs :: [FilePath] -> DynFlags -> DynFlags setPackageDbs paths dflags = dflags { packageDBFlags = - [PackageDB $ PkgConfFile path | path <- paths] ++ [NoGlobalPackageDB, ClearPackageDBs] + [PackageDB $ PkgConfFile $ path "package.conf.d" | path <- paths] ++ [NoGlobalPackageDB, ClearPackageDBs] , pkgDatabase = if null paths then Just [] else Nothing -- if we don't load any packages set the package database to empty and loaded. , settings = (settings dflags)