[commit: ghc] wip/nfs-locking: Minor revision (f50439d)

git at git.haskell.org git at git.haskell.org
Fri Oct 27 00:13:42 UTC 2017


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/nfs-locking
Link       : http://ghc.haskell.org/trac/ghc/changeset/f50439d081f137ee3e7abfbdc2f19e4b37620bbd/ghc

>---------------------------------------------------------------

commit f50439d081f137ee3e7abfbdc2f19e4b37620bbd
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date:   Mon May 16 00:26:02 2016 +0100

    Minor revision


>---------------------------------------------------------------

f50439d081f137ee3e7abfbdc2f19e4b37620bbd
 src/Rules/Register.hs | 21 ++++++++++-----------
 1 file changed, 10 insertions(+), 11 deletions(-)

diff --git a/src/Rules/Register.hs b/src/Rules/Register.hs
index cd3649b..f35413a 100644
--- a/src/Rules/Register.hs
+++ b/src/Rules/Register.hs
@@ -10,38 +10,37 @@ import Settings
 import Settings.Packages.Rts
 import Target
 
--- Build package-data.mk by using GhcCabal to process pkgCabal file
+-- | Build package-data.mk by processing the .cabal file with ghc-cabal utility.
 registerPackage :: [(Resource, Int)] -> Context -> Rules ()
 registerPackage rs context at Context {..} = do
-    let oldPath = pkgPath package -/- contextDirectory context -- TODO: remove, #113
+    let path    = buildPath context
+        oldPath = pkgPath package -/- contextDirectory context -- TODO: remove, #113
         pkgConf = packageDbDirectory stage -/- pkgNameString package
 
     when (stage <= Stage1) $ matchVersionedFilePath pkgConf "conf" ?> \conf -> do
-        -- This produces inplace-pkg-config. TODO: Add explicit tracking
+        -- This produces inplace-pkg-config. TODO: Add explicit tracking.
         need [pkgDataFile context]
 
         -- Post-process inplace-pkg-config. TODO: remove, see #113, #148
         let pkgConfig    = oldPath -/- "inplace-pkg-config"
             oldBuildPath = oldPath -/- "build"
             fixPkgConf   = unlines
-                         . map (replace oldBuildPath (buildPath context)
-                         . replace (replaceSeparators '\\' $ oldBuildPath)
-                                   (buildPath context) )
+                         . map
+                         ( replace oldBuildPath path
+                         . replace (replaceSeparators '\\' oldBuildPath) path )
                          . lines
 
         fixFile pkgConfig fixPkgConf
 
-        buildWithResources rs $
-            Target context (GhcPkg stage) [pkgConfig] [conf]
+        buildWithResources rs $ Target context (GhcPkg stage) [pkgConfig] [conf]
 
     when (package == rts && stage == Stage1) $ do
         packageDbDirectory Stage1 -/- "rts.conf" %> \conf -> do
             need [rtsConf]
-            buildWithResources rs $
-                Target context (GhcPkg stage) [rtsConf] [conf]
+            buildWithResources rs $ Target context (GhcPkg stage) [rtsConf] [conf]
 
         rtsConf %> \_ -> do
-            need [ pkgDataFile rtsContext, rtsConfIn ]
+            need [pkgDataFile rtsContext, rtsConfIn]
             build $ Target context HsCpp [rtsConfIn] [rtsConf]
 
             let fixRtsConf = unlines



More information about the ghc-commits mailing list