[commit: ghc] wip/nfs-locking: Simplify ghcCabalPackageArgs (4e80495)

git at git.haskell.org git at git.haskell.org
Fri Oct 27 00:46:03 UTC 2017


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

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

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

commit 4e8049531d734957c1c71fdbe3f18a52db2e2f2d
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date:   Sun Nov 27 15:56:22 2016 +0000

    Simplify ghcCabalPackageArgs


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

4e8049531d734957c1c71fdbe3f18a52db2e2f2d
 src/Settings/Packages/GhcCabal.hs | 21 ++++++---------------
 1 file changed, 6 insertions(+), 15 deletions(-)

diff --git a/src/Settings/Packages/GhcCabal.hs b/src/Settings/Packages/GhcCabal.hs
index f41053f..8e5837c 100644
--- a/src/Settings/Packages/GhcCabal.hs
+++ b/src/Settings/Packages/GhcCabal.hs
@@ -6,21 +6,12 @@ import Oracles.Config.Setting
 import Predicate
 
 ghcCabalPackageArgs :: Args
-ghcCabalPackageArgs = package ghcCabal ?
-    builder Ghc ? mconcat [ ghcCabalBootArgs
-                          , remove ["-no-auto-link-packages"] ]
-
--- TODO: do we need -DCABAL_VERSION=$(CABAL_VERSION)?
-ghcCabalBootArgs :: Args
-ghcCabalBootArgs = stage0 ? do
-    -- Note: We could have computed 'cabalDeps' instead of hard-coding it
-    -- but this doesn't worth the effort, since we plan to drop ghc-cabal
-    -- altogether at some point. See #18.
-    cabalDeps <- fromDiffExpr $ mconcat
-        [ append [ array, base, bytestring, containers, deepseq, directory
-                 , pretty, process, time ]
-        , notM windowsHost ? append [unix]
-        , windowsHost ? append [win32] ]
+ghcCabalPackageArgs = stage0 ? package ghcCabal ? builder Ghc ? do
+    -- Note: We could compute 'cabalDeps' instead of hard-coding it but this
+    -- seems unnecessary since we plan to drop @ghc-cabal@ altogether, #18.
+    win <- lift windowsHost
+    let cabalDeps = [ array, base, bytestring, containers, deepseq, directory
+                    , pretty, process, time, if win then win32 else unix ]
     mconcat
         [ append [ "-package " ++ pkgNameString pkg | pkg <- cabalDeps ]
         , arg "--make"



More information about the ghc-commits mailing list