[commit: ghc] wip/nfs-locking: Implement argPath that unifies the path argument. (5a4a443)

git at git.haskell.org git at git.haskell.org
Thu Oct 26 23:30:15 UTC 2017


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

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

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

commit 5a4a443af1fabc548894ca9d3f75702a4b08cf21
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date:   Wed Jul 15 23:55:46 2015 +0200

    Implement argPath that unifies the path argument.


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

5a4a443af1fabc548894ca9d3f75702a4b08cf21
 src/Settings/GhcCabal.hs |  4 ++--
 src/Settings/GhcPkg.hs   |  2 +-
 src/Settings/Util.hs     | 12 +++++++-----
 3 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/src/Settings/GhcCabal.hs b/src/Settings/GhcCabal.hs
index 7281b9f..34984b7 100644
--- a/src/Settings/GhcCabal.hs
+++ b/src/Settings/GhcCabal.hs
@@ -21,8 +21,8 @@ cabalArgs = builder GhcCabal ? do
     stage <- asks getStage
     pkg   <- asks getPackage
     mconcat [ arg "configure"
-            , arg $ pkgPath pkg
-            , arg $ targetDirectory stage pkg
+            , argPath $ pkgPath pkg
+            , argPath $ targetDirectory stage pkg
             , dllArgs
             , with $ Ghc stage
             , with $ GhcPkg stage
diff --git a/src/Settings/GhcPkg.hs b/src/Settings/GhcPkg.hs
index 9bf85e7..a75eab7 100644
--- a/src/Settings/GhcPkg.hs
+++ b/src/Settings/GhcPkg.hs
@@ -18,4 +18,4 @@ ghcPkgArgs = do
         [ arg "update"
         , arg "--force"
         , stage0 ? bootPackageDbArgs
-        , arg $ targetPath stage pkg </> "inplace-pkg-config" ]
+        , argPath $ targetPath stage pkg </> "inplace-pkg-config" ]
diff --git a/src/Settings/Util.hs b/src/Settings/Util.hs
index b529376..9ee4986 100644
--- a/src/Settings/Util.hs
+++ b/src/Settings/Util.hs
@@ -1,6 +1,6 @@
 module Settings.Util (
     -- Primitive settings elements
-    arg, argM,
+    arg, argPath, argM,
     argConfig, argStagedConfig, argConfigList, argStagedConfigList,
     appendCcArgs,
     -- argBuilderPath, argStagedBuilderPath,
@@ -12,14 +12,19 @@ module Settings.Util (
     ) where
 
 import Base
+import Util
 import Builder
 import Oracles.Base
 import Expression
 
--- A single argument
+-- A single argument.
 arg :: String -> Args
 arg = append . return
 
+-- A single path argument. The path gets unified.
+argPath :: String -> Args
+argPath = append . return . unifyPath
+
 argM :: Action String -> Args
 argM = appendM . fmap return
 
@@ -50,9 +55,6 @@ appendCcArgs xs = do
             , builder GhcCabal    ? appendSub "--configure-option=CFLAGS" xs
             , builder GhcCabal    ? appendSub "--gcc-options" xs ]
 
-
-
-
 -- packageData :: Arity -> String -> Args
 -- packageData arity key =
 --     return $ EnvironmentParameter $ PackageData arity key Nothing Nothing



More information about the ghc-commits mailing list