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

git at git.haskell.org git at git.haskell.org
Fri Oct 27 00:06:56 UTC 2017


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

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

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

commit a9adcf31d5daf441cfa4efc5ac4012a3836c9b19
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date:   Sat Sep 19 00:04:02 2015 +0100

    Clean up.


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

a9adcf31d5daf441cfa4efc5ac4012a3836c9b19
 arg/README.md                    |  5 -----
 src/Builder.hs                   | 13 +++++++------
 src/Oracles/Config/Setting.hs    |  2 +-
 src/Oracles/PackageDeps.hs       |  2 +-
 src/Rules/Cabal.hs               |  4 ++--
 src/Settings/Args.hs             |  8 ++++----
 src/Settings/Builders/Ar.hs      |  1 -
 src/Settings/Builders/Haddock.hs |  2 +-
 src/Settings/Packages.hs         |  4 +---
 src/Stage.hs                     |  2 +-
 10 files changed, 18 insertions(+), 25 deletions(-)

diff --git a/arg/README.md b/arg/README.md
deleted file mode 100644
index 0af8834..0000000
--- a/arg/README.md
+++ /dev/null
@@ -1,5 +0,0 @@
-This folder serves two purposes:
-
-* Tracking argument lists produced by rules
-
-* Documentation
diff --git a/src/Builder.hs b/src/Builder.hs
index dde37c1..8e5f639 100644
--- a/src/Builder.hs
+++ b/src/Builder.hs
@@ -36,14 +36,14 @@ builderKey builder = case builder of
     Ar               -> "ar"
     Gcc Stage0       -> "system-gcc"
     Gcc _            -> "gcc"
-    GccM stage       -> builderKey $ Gcc stage -- Synonym for 'Gcc -MM'
+    GccM stage       -> builderKey $ Gcc stage -- synonym for 'Gcc -MM'
     Ghc Stage0       -> "system-ghc"
     Ghc Stage1       -> "ghc-stage1"
     Ghc Stage2       -> "ghc-stage2"
     Ghc Stage3       -> "ghc-stage3"
-    GhcM stage       -> builderKey $ Ghc stage -- Synonym for 'Ghc -M'
+    GhcM stage       -> builderKey $ Ghc stage -- synonym for 'Ghc -M'
     GhcCabal         -> "ghc-cabal"
-    GhcCabalHsColour -> builderKey $ GhcCabal -- Synonym for 'GhcCabal hscolour'
+    GhcCabalHsColour -> builderKey $ GhcCabal -- synonym for 'GhcCabal hscolour'
     GhcPkg Stage0    -> "system-ghc-pkg"
     GhcPkg _         -> "ghc-pkg"
     Happy            -> "happy"
@@ -72,9 +72,10 @@ needBuilder laxDependencies builder = do
     else need      [path]
   where
     allowOrderOnlyDependency :: Builder -> Bool
-    allowOrderOnlyDependency (Ghc  _) = True
-    allowOrderOnlyDependency (GhcM _) = True
-    allowOrderOnlyDependency _        = False
+    allowOrderOnlyDependency b = case b of
+        Ghc  _ -> True
+        GhcM _ -> True
+        _      -> False
 
 -- On Windows: if the path starts with "/", prepend it with the correct path to
 -- the root, e.g: "/usr/local/bin/ghc.exe" => "C:/msys/usr/local/bin/ghc.exe".
diff --git a/src/Oracles/Config/Setting.hs b/src/Oracles/Config/Setting.hs
index 27b2d89..f0f7fb7 100644
--- a/src/Oracles/Config/Setting.hs
+++ b/src/Oracles/Config/Setting.hs
@@ -7,8 +7,8 @@ module Oracles.Config.Setting (
     ) where
 
 import Base
-import Stage
 import Oracles.Config
+import Stage
 
 -- Each Setting comes from the system.config file, e.g. 'target-os = mingw32'.
 -- setting TargetOs looks up the config file and returns "mingw32".
diff --git a/src/Oracles/PackageDeps.hs b/src/Oracles/PackageDeps.hs
index 1898d21..0d1a0b4 100644
--- a/src/Oracles/PackageDeps.hs
+++ b/src/Oracles/PackageDeps.hs
@@ -2,8 +2,8 @@
 module Oracles.PackageDeps (packageDeps, packageDepsOracle) where
 
 import Base
-import Package
 import qualified Data.HashMap.Strict as Map
+import Package
 
 newtype PackageDepsKey = PackageDepsKey PackageName
     deriving (Show, Typeable, Eq, Hashable, Binary, NFData)
diff --git a/src/Rules/Cabal.hs b/src/Rules/Cabal.hs
index b958db4..aac8ab2 100644
--- a/src/Rules/Cabal.hs
+++ b/src/Rules/Cabal.hs
@@ -1,11 +1,11 @@
 module Rules.Cabal (cabalRules) where
 
+import Expression
 import Data.Version
 import Distribution.Package
-import Distribution.Verbosity
 import Distribution.PackageDescription
 import Distribution.PackageDescription.Parse
-import Expression
+import Distribution.Verbosity
 import Package hiding (library)
 import Settings
 
diff --git a/src/Settings/Args.hs b/src/Settings/Args.hs
index 4e55a3d..5a8c63a 100644
--- a/src/Settings/Args.hs
+++ b/src/Settings/Args.hs
@@ -1,14 +1,14 @@
 module Settings.Args (getArgs) where
 
 import Expression
-import Settings.User
 import Settings.Builders.Ar
-import Settings.Builders.Ld
-import Settings.Builders.Ghc
 import Settings.Builders.Gcc
+import Settings.Builders.Ghc
+import Settings.Builders.GhcCabal
 import Settings.Builders.GhcPkg
 import Settings.Builders.Haddock
-import Settings.Builders.GhcCabal
+import Settings.Builders.Ld
+import Settings.User
 
 getArgs :: Expr [String]
 getArgs = fromDiffExpr $ defaultArgs <> userArgs
diff --git a/src/Settings/Builders/Ar.hs b/src/Settings/Builders/Ar.hs
index 617d4e1..082cbaf 100644
--- a/src/Settings/Builders/Ar.hs
+++ b/src/Settings/Builders/Ar.hs
@@ -1,6 +1,5 @@
 module Settings.Builders.Ar (arArgs, arPersistentArgsCount) where
 
-import Builder
 import Expression
 import Predicates (builder)
 
diff --git a/src/Settings/Builders/Haddock.hs b/src/Settings/Builders/Haddock.hs
index bc6622c..2cd26d0 100644
--- a/src/Settings/Builders/Haddock.hs
+++ b/src/Settings/Builders/Haddock.hs
@@ -1,8 +1,8 @@
 module Settings.Builders.Haddock (haddockArgs) where
 
 import Expression
-import Predicates hiding (file)
 import Oracles
+import Predicates hiding (file)
 import Settings
 import Settings.Builders.Ghc
 
diff --git a/src/Settings/Packages.hs b/src/Settings/Packages.hs
index 7f2a64b..87f293d 100644
--- a/src/Settings/Packages.hs
+++ b/src/Settings/Packages.hs
@@ -1,6 +1,4 @@
-module Settings.Packages (
-    getPackages, knownPackages, findKnownPackage
-    ) where
+module Settings.Packages (getPackages, knownPackages, findKnownPackage) where
 
 import Expression
 import Predicates
diff --git a/src/Stage.hs b/src/Stage.hs
index 50a273b..edddb6f 100644
--- a/src/Stage.hs
+++ b/src/Stage.hs
@@ -4,7 +4,7 @@ module Stage (Stage (..)) where
 import Base
 import GHC.Generics (Generic)
 
--- TODO: rename to something more meaningful, e.g. Stage0 -> Boot.
+-- TODO: rename to something more meaningful, e.g. 'Stage0' -> 'Boot'.
 data Stage = Stage0 | Stage1 | Stage2 | Stage3 deriving (Eq, Enum, Generic)
 
 instance Show Stage where



More information about the ghc-commits mailing list