mirror of
https://github.com/haskell/ghcide.git
synced 2024-12-17 23:22:04 +03:00
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
This commit is contained in:
parent
56d7dac830
commit
73b9de2536
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user