[commit: ghc] wip/nfs-locking: Rename Settings.Optimisation to Settings.SourceArgs (71b2b96)

git at git.haskell.org git at git.haskell.org
Fri Oct 27 00:31:02 UTC 2017


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

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

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

commit 71b2b96820f4ac6100840c3782d7d9fbabc6dac7
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date:   Thu Jan 12 12:21:54 2017 +0000

    Rename Settings.Optimisation to Settings.SourceArgs


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

71b2b96820f4ac6100840c3782d7d9fbabc6dac7
 hadrian.cabal                                   |  2 +-
 src/Settings/Default.hs                         |  8 ++++----
 src/Settings/Flavours/Development.hs            |  4 ++--
 src/Settings/Flavours/Performance.hs            |  4 ++--
 src/Settings/Flavours/Profiled.hs               |  4 ++--
 src/Settings/Flavours/Quick.hs                  |  4 ++--
 src/Settings/Flavours/Quickest.hs               |  4 ++--
 src/Settings/{Optimisation.hs => SourceArgs.hs} | 10 +++++-----
 8 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/hadrian.cabal b/hadrian.cabal
index d3ef74c..c8cb0b7 100644
--- a/hadrian.cabal
+++ b/hadrian.cabal
@@ -90,7 +90,7 @@ executable hadrian
                        , Settings.Flavours.Profiled
                        , Settings.Flavours.Quick
                        , Settings.Flavours.Quickest
-                       , Settings.Optimisation
+                       , Settings.SourceArgs
                        , Settings.Packages.Base
                        , Settings.Packages.Compiler
                        , Settings.Packages.Ghc
diff --git a/src/Settings/Default.hs b/src/Settings/Default.hs
index 2a9fae4..3aa3a65 100644
--- a/src/Settings/Default.hs
+++ b/src/Settings/Default.hs
@@ -27,7 +27,7 @@ import Settings.Builders.HsCpp
 import Settings.Builders.Ld
 import Settings.Builders.Make
 import Settings.Builders.Tar
-import Settings.Optimisation
+import Settings.SourceArgs
 import Settings.Packages.Base
 import Settings.Packages.Compiler
 import Settings.Packages.Ghc
@@ -43,12 +43,12 @@ import Settings.Packages.RunGhc
 defaultArgs :: Args
 defaultArgs = mconcat
     [ defaultBuilderArgs
-    , optimisationArgs defaultOptimisation
+    , sourceArgs defaultSourceArgs
     , defaultPackageArgs ]
 
 -- | Default optimisation settings.
-defaultOptimisation :: Optimisation
-defaultOptimisation = Optimisation
+defaultSourceArgs :: SourceArgs
+defaultSourceArgs = SourceArgs
     { hsDefault  = mconcat [stage0 ? arg "-O", notStage0 ? arg "-O2", arg "-H32m"]
     , hsLibrary  = mempty
     , hsCompiler = mempty
diff --git a/src/Settings/Flavours/Development.hs b/src/Settings/Flavours/Development.hs
index a90c157..f3f9499 100644
--- a/src/Settings/Flavours/Development.hs
+++ b/src/Settings/Flavours/Development.hs
@@ -3,7 +3,7 @@ module Settings.Flavours.Development (developmentFlavour) where
 import Flavour
 import Predicate
 import {-# SOURCE #-} Settings.Default
-import Settings.Optimisation
+import Settings.SourceArgs
 
 -- TODO: Implement an equivalent of LAX_DEPENDENCIES = YES setting, see #250.
 developmentFlavour :: Stage -> Flavour
@@ -14,7 +14,7 @@ developmentFlavour ghcStage = defaultFlavour
 developmentArgs :: Stage -> Args
 developmentArgs ghcStage = do
     stage <- getStage
-    optimisationArgs $ Optimisation
+    sourceArgs $ SourceArgs
         { hsDefault  = append ["-O", "-H64m"]
         , hsLibrary  = notStage0 ? arg "-dcore-lint"
         , hsCompiler = succ stage == ghcStage ? append ["-O0", "-DDEBUG"]
diff --git a/src/Settings/Flavours/Performance.hs b/src/Settings/Flavours/Performance.hs
index 69e244a..ae3197e 100644
--- a/src/Settings/Flavours/Performance.hs
+++ b/src/Settings/Flavours/Performance.hs
@@ -3,7 +3,7 @@ module Settings.Flavours.Performance (performanceFlavour) where
 import Flavour
 import Predicate
 import {-# SOURCE #-} Settings.Default
-import Settings.Optimisation
+import Settings.SourceArgs
 
 performanceFlavour :: Flavour
 performanceFlavour = defaultFlavour
@@ -11,7 +11,7 @@ performanceFlavour = defaultFlavour
     , args = defaultBuilderArgs <> performanceArgs <> defaultPackageArgs }
 
 performanceArgs :: Args
-performanceArgs = optimisationArgs $ Optimisation
+performanceArgs = sourceArgs $ SourceArgs
     { hsDefault  = append ["-O", "-H64m"]
     , hsLibrary  = notStage0 ? arg "-O2"
     , hsCompiler = mconcat [stage0 ? arg "-O", notStage0 ? arg "-O2"]
diff --git a/src/Settings/Flavours/Profiled.hs b/src/Settings/Flavours/Profiled.hs
index 0a1a6ed..b3f9117 100644
--- a/src/Settings/Flavours/Profiled.hs
+++ b/src/Settings/Flavours/Profiled.hs
@@ -3,7 +3,7 @@ module Settings.Flavours.Profiled (profiledFlavour) where
 import Flavour
 import Predicate
 import {-# SOURCE #-} Settings.Default
-import Settings.Optimisation
+import Settings.SourceArgs
 
 profiledFlavour :: Flavour
 profiledFlavour = defaultFlavour
@@ -12,7 +12,7 @@ profiledFlavour = defaultFlavour
     , ghcProfiled = True }
 
 profiledArgs :: Args
-profiledArgs = optimisationArgs $ Optimisation
+profiledArgs = sourceArgs $ SourceArgs
     { hsDefault  = append ["-O0", "-H64m"]
     , hsLibrary  = notStage0 ? arg "-O"
     , hsCompiler = arg "-O"
diff --git a/src/Settings/Flavours/Quick.hs b/src/Settings/Flavours/Quick.hs
index dd9cd58..565e748 100644
--- a/src/Settings/Flavours/Quick.hs
+++ b/src/Settings/Flavours/Quick.hs
@@ -3,7 +3,7 @@ module Settings.Flavours.Quick (quickFlavour) where
 import Flavour
 import Predicate
 import {-# SOURCE #-} Settings.Default
-import Settings.Optimisation
+import Settings.SourceArgs
 
 quickFlavour :: Flavour
 quickFlavour = defaultFlavour
@@ -13,7 +13,7 @@ quickFlavour = defaultFlavour
 
 -- TODO: the hsLibrary setting seems wrong, but it matches mk/flavours/quick.mk
 quickArgs :: Args
-quickArgs = optimisationArgs $ Optimisation
+quickArgs = sourceArgs $ SourceArgs
     { hsDefault  = append ["-O0", "-H64m"]
     , hsLibrary  = notStage0 ? arg "-O"
     , hsCompiler =    stage0 ? arg "-O"
diff --git a/src/Settings/Flavours/Quickest.hs b/src/Settings/Flavours/Quickest.hs
index 0473dc6..abb2ccf 100644
--- a/src/Settings/Flavours/Quickest.hs
+++ b/src/Settings/Flavours/Quickest.hs
@@ -3,7 +3,7 @@ module Settings.Flavours.Quickest (quickestFlavour) where
 import Flavour
 import Predicate
 import {-# SOURCE #-} Settings.Default
-import Settings.Optimisation
+import Settings.SourceArgs
 
 quickestFlavour :: Flavour
 quickestFlavour = defaultFlavour
@@ -13,7 +13,7 @@ quickestFlavour = defaultFlavour
     , rtsWays     = quickestRtsWays }
 
 quickestArgs :: Args
-quickestArgs = optimisationArgs $ Optimisation
+quickestArgs = sourceArgs $ SourceArgs
     { hsDefault  = append ["-O0", "-H64m"]
     , hsLibrary  = mempty
     , hsCompiler = mempty
diff --git a/src/Settings/Optimisation.hs b/src/Settings/SourceArgs.hs
similarity index 66%
rename from src/Settings/Optimisation.hs
rename to src/Settings/SourceArgs.hs
index 6d47941..0c638ca 100644
--- a/src/Settings/Optimisation.hs
+++ b/src/Settings/SourceArgs.hs
@@ -1,17 +1,17 @@
-module Settings.Optimisation (Optimisation (..), optimisationArgs) where
+module Settings.SourceArgs (SourceArgs (..), sourceArgs) where
 
 import GHC
 import Predicate
 
--- TODO: Move C optimisation settings here
-data Optimisation = Optimisation
+-- TODO: Move C source arguments here
+data SourceArgs = SourceArgs
     { hsDefault  :: Args
     , hsLibrary  :: Args
     , hsCompiler :: Args
     , hsGhc      :: Args }
 
-optimisationArgs :: Optimisation -> Args
-optimisationArgs Optimisation {..} = do
+sourceArgs :: SourceArgs -> Args
+sourceArgs SourceArgs {..} = do
     hsCompile <- builder $ Ghc CompileHs
     hsLink    <- builder $ Ghc LinkHs
     pkg       <- getPackage



More information about the ghc-commits mailing list