[commit: ghc] wip/nfs-locking: Rename PackageDb to PackageDatabase (026466a)
git at git.haskell.org
git at git.haskell.org
Fri Oct 27 01:03:06 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/nfs-locking
Link : http://ghc.haskell.org/trac/ghc/changeset/026466ad55688891c0e82b5de98f555dc6932223/ghc
>---------------------------------------------------------------
commit 026466ad55688891c0e82b5de98f555dc6932223
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date: Sun May 22 01:48:07 2016 +0100
Rename PackageDb to PackageDatabase
>---------------------------------------------------------------
026466ad55688891c0e82b5de98f555dc6932223
hadrian.cabal | 2 +-
src/Oracles/{PackageDb.hs => PackageDatabase.hs} | 8 ++++----
src/Rules/Oracles.hs | 8 ++++----
src/Settings/Builders/Ghc.hs | 2 +-
src/Settings/Builders/GhcCabal.hs | 20 ++++++++++----------
src/Settings/Builders/GhcPkg.hs | 4 ++--
6 files changed, 22 insertions(+), 22 deletions(-)
diff --git a/hadrian.cabal b/hadrian.cabal
index a65bbf8..95ae3a0 100644
--- a/hadrian.cabal
+++ b/hadrian.cabal
@@ -32,7 +32,7 @@ executable hadrian
, Oracles.LookupInPath
, Oracles.ModuleFiles
, Oracles.PackageData
- , Oracles.PackageDb
+ , Oracles.PackageDatabase
, Oracles.WindowsPath
, Package
, Predicate
diff --git a/src/Oracles/PackageDb.hs b/src/Oracles/PackageDatabase.hs
similarity index 74%
rename from src/Oracles/PackageDb.hs
rename to src/Oracles/PackageDatabase.hs
index 61b134a..f89a2cc 100644
--- a/src/Oracles/PackageDb.hs
+++ b/src/Oracles/PackageDatabase.hs
@@ -1,4 +1,4 @@
-module Oracles.PackageDb (packageDbOracle) where
+module Oracles.PackageDatabase (packageDatabaseOracle) where
import qualified System.Directory as IO
@@ -12,9 +12,9 @@ import Settings.Paths
import Settings.User
import Target
-packageDbOracle :: Rules ()
-packageDbOracle = void $
- addOracle $ \(PackageDbKey stage) -> do
+packageDatabaseOracle :: Rules ()
+packageDatabaseOracle = void $
+ addOracle $ \(PackageDatabaseKey stage) -> do
let dir = packageDbDirectory stage
file = dir -/- "package.cache"
unlessM (liftIO $ IO.doesFileExist file) $ do
diff --git a/src/Rules/Oracles.hs b/src/Rules/Oracles.hs
index 93bccfc..7beb67f 100644
--- a/src/Rules/Oracles.hs
+++ b/src/Rules/Oracles.hs
@@ -1,14 +1,14 @@
module Rules.Oracles (oracleRules) where
import Base
+import qualified Oracles.ArgsHash
import qualified Oracles.Config
import qualified Oracles.Dependencies
import qualified Oracles.LookupInPath
+import qualified Oracles.ModuleFiles
import qualified Oracles.PackageData
+import qualified Oracles.PackageDatabase
import qualified Oracles.WindowsPath
-import qualified Oracles.ArgsHash
-import qualified Oracles.ModuleFiles
-import qualified Oracles.PackageDb
oracleRules :: Rules ()
oracleRules = do
@@ -18,5 +18,5 @@ oracleRules = do
Oracles.LookupInPath.lookupInPathOracle
Oracles.ModuleFiles.moduleFilesOracle
Oracles.PackageData.packageDataOracle
- Oracles.PackageDb.packageDbOracle
+ Oracles.PackageDatabase.packageDatabaseOracle
Oracles.WindowsPath.windowsPathOracle
diff --git a/src/Settings/Builders/Ghc.hs b/src/Settings/Builders/Ghc.hs
index 02ffe4d..9b1430d 100644
--- a/src/Settings/Builders/Ghc.hs
+++ b/src/Settings/Builders/Ghc.hs
@@ -118,7 +118,7 @@ packageGhcArgs = do
return $ if not0 || unit then "-this-unit-id " else "-this-package-key "
mconcat [ arg "-hide-all-packages"
, arg "-no-user-package-db"
- , bootPackageDbArgs
+ , bootPackageDatabaseArgs
, isLibrary pkg ? arg (thisArg ++ compId)
, append $ map ("-package-id " ++) pkgDepIds ]
diff --git a/src/Settings/Builders/GhcCabal.hs b/src/Settings/Builders/GhcCabal.hs
index beaa8c7..396e69b 100644
--- a/src/Settings/Builders/GhcCabal.hs
+++ b/src/Settings/Builders/GhcCabal.hs
@@ -1,7 +1,7 @@
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module Settings.Builders.GhcCabal (
- ghcCabalBuilderArgs, ghcCabalHsColourBuilderArgs, bootPackageDbArgs,
- PackageDbKey (..), cppArgs, buildDll0
+ ghcCabalBuilderArgs, ghcCabalHsColourBuilderArgs, bootPackageDatabaseArgs,
+ PackageDatabaseKey (..), cppArgs, buildDll0
) where
import Base
@@ -23,7 +23,7 @@ ghcCabalBuilderArgs = builder GhcCabal ? do
, dll0Args
, withStaged $ Ghc Compile
, withStaged GhcPkg
- , bootPackageDbArgs
+ , bootPackageDatabaseArgs
, libraryArgs
, with HsColour
, configureArgs
@@ -81,16 +81,16 @@ configureArgs = do
, crossCompiling ? (conf "--host" $ argSetting TargetPlatformFull)
, conf "--with-cc" $ argStagedBuilderPath (Cc Compile) ]
-newtype PackageDbKey = PackageDbKey Stage
- deriving (Show, Typeable, Eq, Hashable, Binary, NFData)
+newtype PackageDatabaseKey = PackageDatabaseKey Stage
+ deriving (Binary, Eq, Hashable, NFData, Show, Typeable)
-initialisePackageDb :: Stage -> Action ()
-initialisePackageDb stage = askOracle $ PackageDbKey stage
+initialisePackageDatabase :: Stage -> Action ()
+initialisePackageDatabase = askOracle . PackageDatabaseKey
-bootPackageDbArgs :: Args
-bootPackageDbArgs = do
+bootPackageDatabaseArgs :: Args
+bootPackageDatabaseArgs = do
stage <- getStage
- lift $ initialisePackageDb stage
+ lift $ initialisePackageDatabase stage
stage0 ? do
path <- getTopDirectory
prefix <- ifM (builder Ghc) (return "-package-db ") (return "--package-db=")
diff --git a/src/Settings/Builders/GhcPkg.hs b/src/Settings/Builders/GhcPkg.hs
index ba176ac..d6efd0b 100644
--- a/src/Settings/Builders/GhcPkg.hs
+++ b/src/Settings/Builders/GhcPkg.hs
@@ -14,12 +14,12 @@ initPredicate = orM $ map (output . packageDbDirectory) [Stage0 ..]
initArgs :: Args
initArgs = initPredicate ? mconcat [ arg "init", arg =<< getOutput ]
--- TODO: move inplace-pkg-config to buildRootPath, see #113.
+-- TODO: Move inplace-pkg-config to buildRootPath, see #113.
updateArgs :: Args
updateArgs = notM initPredicate ? do
pkg <- getPackage
dir <- getContextDirectory
mconcat [ arg "update"
, arg "--force"
- , bootPackageDbArgs
+ , bootPackageDatabaseArgs
, arg $ pkgPath pkg -/- dir -/- "inplace-pkg-config" ]
More information about the ghc-commits
mailing list