[commit: ghc] wip/nfs-locking: Clean up. (738bac8)

git at git.haskell.org git at git.haskell.org
Thu Oct 26 23:37:55 UTC 2017


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

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

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

commit 738bac8ccaa266a76a1a21ccb1ff1f8cbe785a70
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date:   Mon Sep 21 01:00:48 2015 +0100

    Clean up.


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

738bac8ccaa266a76a1a21ccb1ff1f8cbe785a70
 src/Settings/Builders/Alex.hs     |  2 +-
 src/Settings/Builders/GhcCabal.hs | 10 ++++++++--
 src/Settings/Builders/Happy.hs    |  2 +-
 3 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/src/Settings/Builders/Alex.hs b/src/Settings/Builders/Alex.hs
index 6aedcdb..1e0f87b 100644
--- a/src/Settings/Builders/Alex.hs
+++ b/src/Settings/Builders/Alex.hs
@@ -6,8 +6,8 @@ import Predicates (builder, package)
 
 alexArgs :: Args
 alexArgs = builder Alex ? do
-    file <- getFile
     src  <- getSource
+    file <- getFile
     mconcat [ arg "-g"
             , package compiler ? arg "--latin1"
             , arg src
diff --git a/src/Settings/Builders/GhcCabal.hs b/src/Settings/Builders/GhcCabal.hs
index dd54097..ab65a51 100644
--- a/src/Settings/Builders/GhcCabal.hs
+++ b/src/Settings/Builders/GhcCabal.hs
@@ -1,5 +1,6 @@
 module Settings.Builders.GhcCabal (
-    cabalArgs, ghcCabalHsColourArgs, bootPackageDbArgs, customPackageArgs
+    cabalArgs, ghcCabalHsColourArgs, bootPackageDbArgs, customPackageArgs,
+    ccArgs, ccWarnings, argStagedSettingList
     ) where
 
 import Expression
@@ -54,6 +55,7 @@ libraryArgs = do
              then  "--enable-shared"
              else "--disable-shared" ]
 
+-- TODO: LD_OPTS?
 configureArgs :: Args
 configureArgs = do
     let conf key = appendSubD $ "--configure-option=" ++ key
@@ -94,7 +96,11 @@ packageConstraints = stage0 ? do
 -- TODO: should be in a different file
 -- TODO: put all validating options together in one file
 ccArgs :: Args
-ccArgs = validating ? do
+ccArgs = validating ? ccWarnings
+
+-- TODO: should be in a different file
+ccWarnings :: Args
+ccWarnings = do
     let notClang = fmap not gccIsClang
     mconcat [ arg "-Werror"
             , arg "-Wall"
diff --git a/src/Settings/Builders/Happy.hs b/src/Settings/Builders/Happy.hs
index fcd962a..685c30d 100644
--- a/src/Settings/Builders/Happy.hs
+++ b/src/Settings/Builders/Happy.hs
@@ -5,8 +5,8 @@ import Predicates (builder)
 
 happyArgs :: Args
 happyArgs = builder Happy ? do
-    file <- getFile
     src  <- getSource
+    file <- getFile
     mconcat [ arg "-agc"
             , arg "--strict"
             , arg src



More information about the ghc-commits mailing list