[commit: ghc] wip/nfs-locking: Clean up, make naming consistent: setPkgType -> setType. (f5d4e7b)

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


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

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

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

commit f5d4e7b91aff5a8a0c1e8368173d6c999a01d4b4
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date:   Sun Dec 20 21:19:02 2015 +0000

    Clean up, make naming consistent: setPkgType -> setType.


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

f5d4e7b91aff5a8a0c1e8368173d6c999a01d4b4
 src/Base.hs          | 6 ++----
 src/GHC.hs           | 4 ++--
 src/Package.hs       | 6 +++---
 src/Rules/Program.hs | 4 ----
 4 files changed, 7 insertions(+), 13 deletions(-)

diff --git a/src/Base.hs b/src/Base.hs
index fb3b5e1..009e197 100644
--- a/src/Base.hs
+++ b/src/Base.hs
@@ -20,15 +20,13 @@ module Base (
     shakeFilesPath, configPath, bootPackageConstraints, packageDependencies,
 
     -- * Output
-    putColoured, putOracle, putBuild, putSuccess, putError,
-    renderBox,
+    putColoured, putOracle, putBuild, putSuccess, putError, renderBox,
     module System.Console.ANSI,
 
     -- * Miscellaneous utilities
     bimap, minusOrd, intersectOrd,
     removeFileIfExists,
-    replaceEq, replaceSeparators, decodeModule,
-    unifyPath, (-/-), chunksOfSize,
+    replaceEq, replaceSeparators, decodeModule, unifyPath, (-/-), chunksOfSize,
     ) where
 
 import Control.Applicative
diff --git a/src/GHC.hs b/src/GHC.hs
index 29db671..923fdf1 100644
--- a/src/GHC.hs
+++ b/src/GHC.hs
@@ -51,7 +51,7 @@ dllSplit        = utility  "dll-split"
 filepath        = library  "filepath"
 genapply        = utility  "genapply"
 genprimopcode   = utility  "genprimopcode"
-ghc             = topLevel "ghc-bin"        `setPath` "ghc" `setPkgType` Program
+ghc             = topLevel "ghc-bin"        `setPath` "ghc"   `setType` Program
 ghcBoot         = library  "ghc-boot"
 ghcCabal        = utility  "ghc-cabal"
 ghci            = library  "ghci"
@@ -68,7 +68,7 @@ hpc             = library  "hpc"
 hpcBin          = utility  "hpc-bin"        `setPath` "utils/hpc"
 integerGmp      = library  "integer-gmp"
 integerSimple   = library  "integer-simple"
-iservBin        = topLevel "iserv-bin"      `setPath` "iserv" `setPkgType` Program
+iservBin        = topLevel "iserv-bin"      `setPath` "iserv" `setType` Program
 mkUserGuidePart = utility  "mkUserGuidePart"
 parallel        = library  "parallel"
 pretty          = library  "pretty"
diff --git a/src/Package.hs b/src/Package.hs
index 6273a62..574f01a 100644
--- a/src/Package.hs
+++ b/src/Package.hs
@@ -5,7 +5,7 @@ module Package (
     pkgCabalFile,
     matchPackageNames,
     -- * Helpers for constructing 'Package's
-    setPath, topLevel, library, utility, setPkgType
+    setPath, topLevel, library, utility, setType
     ) where
 
 import Base
@@ -45,8 +45,8 @@ utility name = Package name ("utils" -/- name) Program
 setPath :: Package -> FilePath -> Package
 setPath pkg path = pkg { pkgPath = path }
 
-setPkgType :: Package -> PackageType -> Package
-setPkgType pkg ty = pkg { pkgType = ty }
+setType :: Package -> PackageType -> Package
+setType pkg ty = pkg { pkgType = ty }
 
 instance Show Package where
     show = pkgName
diff --git a/src/Rules/Program.hs b/src/Rules/Program.hs
index 2ff5ef0..9ca36d6 100644
--- a/src/Rules/Program.hs
+++ b/src/Rules/Program.hs
@@ -17,10 +17,6 @@ buildProgram _ target @ (PartialTarget stage pkg) = do
         buildPath = path -/- "build"
         program   = programPath stage pkg
 
-            -- return $  [ ghciLib | needGhciLib == "YES" && stage == Stage1 ]
-            --        ++ [ haddock | needHaddock          && stage == Stage1 ]
-            --        ++ libs
-
     (\f -> program == Just f) ?> \bin -> do
         cSrcs <- cSources target -- TODO: remove code duplication (Library.hs)
         hSrcs <- hSources target



More information about the ghc-commits mailing list