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

git at git.haskell.org git at git.haskell.org
Fri Oct 27 01:15:01 UTC 2017


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

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

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

commit 6552aff7cf7fde37106b03b851e6d4cdbe515b74
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date:   Sun Nov 27 22:39:42 2016 +0000

    Minor revision


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

6552aff7cf7fde37106b03b851e6d4cdbe515b74
 src/Settings/Builders/Cc.hs         |  5 ++---
 src/Settings/Builders/Haddock.hs    |  3 +--
 src/Settings/Packages/Compiler.hs   |  6 ++----
 src/Settings/Packages/IntegerGmp.hs |  4 +---
 src/Settings/Packages/Rts.hs        | 11 +++++------
 src/Settings/Packages/RunGhc.hs     |  5 ++---
 6 files changed, 13 insertions(+), 21 deletions(-)

diff --git a/src/Settings/Builders/Cc.hs b/src/Settings/Builders/Cc.hs
index b0a5f0e..b5d85df 100644
--- a/src/Settings/Builders/Cc.hs
+++ b/src/Settings/Builders/Cc.hs
@@ -8,9 +8,8 @@ ccBuilderArgs = builder Cc ? mconcat
     , argSettingList . ConfCcArgs =<< getStage
     , cIncludeArgs
 
-    , builder (Cc CompileC) ?
-        mconcat [ arg "-c", arg =<< getInput
-                , arg "-o", arg =<< getOutput ]
+    , builder (Cc CompileC) ? mconcat [ arg "-c", arg =<< getInput
+                                      , arg "-o", arg =<< getOutput ]
 
     , builder (Cc FindCDependencies) ? do
         output <- getOutput
diff --git a/src/Settings/Builders/Haddock.hs b/src/Settings/Builders/Haddock.hs
index 312124a..3fff015 100644
--- a/src/Settings/Builders/Haddock.hs
+++ b/src/Settings/Builders/Haddock.hs
@@ -16,7 +16,6 @@ haddockBuilderArgs = builder Haddock ? do
     path     <- getBuildPath
     version  <- getPkgData Version
     synopsis <- getPkgData Synopsis
-    hidden   <- getPkgDataList HiddenModules
     deps     <- getPkgDataList Deps
     depNames <- getPkgDataList DepNames
     hVersion <- lift . pkgData . Version $ buildPath (vanillaContext Stage2 haddock)
@@ -31,7 +30,7 @@ haddockBuilderArgs = builder Haddock ? do
         , arg $ "--title=" ++ pkgNameString pkg ++ "-" ++ version ++ ": " ++ synopsis
         , arg $ "--prologue=" ++ path -/- "haddock-prologue.txt"
         , arg $ "--optghc=-D__HADDOCK_VERSION__=" ++ show (versionToInt hVersion)
-        , append $ map ("--hide=" ++) hidden
+        , append . map ("--hide=" ++) =<< getPkgDataList HiddenModules
         , append $ [ "--read-interface=../" ++ dep
                      ++ ",../" ++ dep ++ "/src/%{MODULE/./-}.html\\#%{NAME},"
                      ++ pkgHaddockFile (vanillaContext Stage1 depPkg)
diff --git a/src/Settings/Packages/Compiler.hs b/src/Settings/Packages/Compiler.hs
index 03b8081..308b3c2 100644
--- a/src/Settings/Packages/Compiler.hs
+++ b/src/Settings/Packages/Compiler.hs
@@ -35,8 +35,6 @@ compilerPackageArgs = package compiler ? do
                 ghciWithDebugger flavour ?
                 notStage0 ? arg "--ghc-option=-DDEBUGGER"
               , ghcProfiled flavour ?
-                notStage0 ? arg "--ghc-pkg-option=--force"
-              ]
+                notStage0 ? arg "--ghc-pkg-option=--force" ]
 
-            , builder Haddock ? arg ("--optghc=-I" ++ path)
-            ]
+            , builder Haddock ? arg ("--optghc=-I" ++ path) ]
diff --git a/src/Settings/Packages/IntegerGmp.hs b/src/Settings/Packages/IntegerGmp.hs
index def2021..7dfcb2f 100644
--- a/src/Settings/Packages/IntegerGmp.hs
+++ b/src/Settings/Packages/IntegerGmp.hs
@@ -15,12 +15,10 @@ integerGmpPackageArgs = package integerGmp ? do
     let includeGmp = "-I" ++ gmpBuildPath -/- "include"
     gmpIncludeDir <- getSetting GmpIncludeDir
     gmpLibDir     <- getSetting GmpLibDir
-
     mconcat [ builder Cc ? arg includeGmp
 
             , builder GhcCabal ? mconcat
               [ (null gmpIncludeDir && null gmpLibDir) ?
                 arg "--configure-option=--with-intree-gmp"
               , appendSub "--configure-option=CFLAGS" [includeGmp]
-              , appendSub "--gcc-options"             [includeGmp] ]
-            ]
+              , appendSub "--gcc-options"             [includeGmp] ] ]
diff --git a/src/Settings/Packages/Rts.hs b/src/Settings/Packages/Rts.hs
index d10c6f0..7d844fa 100644
--- a/src/Settings/Packages/Rts.hs
+++ b/src/Settings/Packages/Rts.hs
@@ -12,10 +12,10 @@ rtsLibffiLibraryName :: Action FilePath
 rtsLibffiLibraryName = do
     useSystemFfi <- flag UseSystemFfi
     windows      <- windowsHost
-    case (useSystemFfi, windows) of
-      (True , False) -> return "ffi"
-      (False, False) -> return "Cffi"
-      (_    , True ) -> return "Cffi-6"
+    return $ case (useSystemFfi, windows) of
+        (True , False) -> "ffi"
+        (False, False) -> "Cffi"
+        (_    , True ) -> "Cffi-6"
 
 rtsPackageArgs :: Args
 rtsPackageArgs = package rts ? do
@@ -88,8 +88,7 @@ rtsPackageArgs = package rts ? do
           [ "-DTOP="             ++ show top
           , "-DFFI_INCLUDE_DIR=" ++ show ffiIncludeDir
           , "-DFFI_LIB_DIR="     ++ show ffiLibraryDir
-          , "-DFFI_LIB="         ++ show libffiName ]
-        ]
+          , "-DFFI_LIB="         ++ show libffiName ] ]
 
 -- # If we're compiling on windows, enforce that we only support XP+
 -- # Adding this here means it doesn't have to be done in individual .c files
diff --git a/src/Settings/Packages/RunGhc.hs b/src/Settings/Packages/RunGhc.hs
index 6880344..dc8ab1f 100644
--- a/src/Settings/Packages/RunGhc.hs
+++ b/src/Settings/Packages/RunGhc.hs
@@ -5,7 +5,6 @@ import Oracles.Config.Setting
 import Predicate
 
 runGhcPackageArgs :: Args
-runGhcPackageArgs = package runGhc ? do
+runGhcPackageArgs = package runGhc ? builder Ghc ? input "//Main.hs" ? do
     version <- getSetting ProjectVersion
-    builder Ghc ? input "//Main.hs" ?
-        append ["-cpp", "-DVERSION=" ++ show version]
+    append ["-cpp", "-DVERSION=" ++ show version]



More information about the ghc-commits mailing list