[commit: ghc] wip/nfs-locking: Minor revision. (7e8bfbb)

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


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

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

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

commit 7e8bfbbe5cf6a1ea303bdaebd862ea74b51eb843
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date:   Mon Feb 8 03:09:14 2016 +0000

    Minor revision.


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

7e8bfbbe5cf6a1ea303bdaebd862ea74b51eb843
 src/Builder.hs |  2 +-
 src/Package.hs | 12 +++++-------
 src/Target.hs  | 16 +++++++---------
 3 files changed, 13 insertions(+), 17 deletions(-)

diff --git a/src/Builder.hs b/src/Builder.hs
index 80fc4ba..d1a2cc3 100644
--- a/src/Builder.hs
+++ b/src/Builder.hs
@@ -58,7 +58,7 @@ builderProvenance = \case
     DeriveConstants  -> Just (Stage0, deriveConstants)
     GenApply         -> Just (Stage0, genapply)
     GenPrimopCode    -> Just (Stage0, genprimopcode)
-    Ghc stage        -> if stage > Stage0 then Just (pred stage, ghc) else Nothing
+    Ghc stage        -> if stage == Stage0 then Nothing else Just (pred stage, ghc)
     GhcM stage       -> builderProvenance $ Ghc stage
     GhcCabal         -> Just (Stage0, ghcCabal)
     GhcCabalHsColour -> builderProvenance $ GhcCabal
diff --git a/src/Package.hs b/src/Package.hs
index 43eb480..4b6fbc6 100644
--- a/src/Package.hs
+++ b/src/Package.hs
@@ -29,13 +29,11 @@ instance Show PackageName where
 data PackageType = Program | Library deriving Generic
 
 data Package = Package
-     {
-         pkgName :: PackageName, -- ^ Examples: "ghc", "Cabal"
-         pkgPath :: FilePath,    -- ^ pkgPath is the path to the source code relative to the root.
-                                 -- e.g. "compiler", "libraries/Cabal/Cabal"
-         pkgType :: PackageType
-     }
-     deriving Generic
+    { pkgName :: PackageName -- ^ Examples: "ghc", "Cabal"
+    , pkgPath :: FilePath    -- ^ pkgPath is the path to the source code relative to the root.
+                             -- e.g. "compiler", "libraries/Cabal/Cabal"
+    , pkgType :: PackageType
+    } deriving Generic
 
 -- | Prettyprint Package name.
 pkgNameString :: Package -> String
diff --git a/src/Target.hs b/src/Target.hs
index d2cbfce..8c39ac7 100644
--- a/src/Target.hs
+++ b/src/Target.hs
@@ -18,15 +18,13 @@ import Way
 
 -- | Parameters relevant to the current build target.
 data Target = Target
-     {
-        stage   :: Stage,      -- ^ Stage being built
-        package :: Package,    -- ^ Package being built
-        builder :: Builder,    -- ^ Builder to be invoked
-        way     :: Way,        -- ^ Way to build (set to vanilla for most targets)
-        inputs  :: [FilePath], -- ^ Source files passed to the builder
-        outputs :: [FilePath]  -- ^ Files to be produced
-     }
-     deriving (Show, Eq, Generic)
+    { stage   :: Stage      -- ^ Stage being built
+    , package :: Package    -- ^ Package being built
+    , builder :: Builder    -- ^ Builder to be invoked
+    , way     :: Way        -- ^ Way to build (set to vanilla for most targets)
+    , inputs  :: [FilePath] -- ^ Source files passed to the builder
+    , outputs :: [FilePath] -- ^ Files to be produced
+    } deriving (Show, Eq, Generic)
 
 -- | If values of type @a@ form a 'Monoid' then we can also derive a 'Monoid'
 -- instance for values of type @'ReaderT' 'Target' 'Action' a@:



More information about the ghc-commits mailing list