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

git at git.haskell.org git at git.haskell.org
Thu Oct 26 23:45:42 UTC 2017


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

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

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

commit 95d594c1836993c98fea985f475df4bbc959fa38
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date:   Thu Dec 24 02:51:44 2015 +0000

    Clean up.


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

95d594c1836993c98fea985f475df4bbc959fa38
 src/Package.hs           | 6 ++----
 src/Settings/Packages.hs | 6 ++++--
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/Package.hs b/src/Package.hs
index 536a16f39..9a64fa8 100644
--- a/src/Package.hs
+++ b/src/Package.hs
@@ -16,8 +16,7 @@ import Data.String
 
 -- | The name of a Cabal package
 newtype PackageName = PackageName { getPackageName :: String }
-                    deriving ( Eq, Ord, IsString, Generic, Binary, Hashable
-                             , Typeable, NFData)
+    deriving (Eq, Ord, IsString, Generic, Binary, Hashable, Typeable, NFData)
 
 instance Show PackageName where
     show (PackageName name) = name
@@ -25,8 +24,7 @@ instance Show PackageName where
 -- | We regard packages as either being libraries or programs. This is
 -- bit of a convenient lie as Cabal packages can be both, but it works
 -- for now.
-data PackageType = Program | Library
-                 deriving Generic
+data PackageType = Program | Library deriving Generic
 
 data Package = Package
      {
diff --git a/src/Settings/Packages.hs b/src/Settings/Packages.hs
index ee37b07..32d12a5 100644
--- a/src/Settings/Packages.hs
+++ b/src/Settings/Packages.hs
@@ -20,10 +20,10 @@ packagesStage0 :: Packages
 packagesStage0 = mconcat
     [ append [ binary, cabal, compiler, ghc, ghcBoot, ghcCabal, ghcPkg
              , hsc2hs, hoopl, hpc, templateHaskell, transformers ]
+    -- the stage0 predicate makes sure these packages are built only in Stage0
     , stage0 ? append [deriveConstants, dllSplit, genapply, genprimopcode, hp2ps]
     , notM windowsHost ? notM (anyHostOs ["ios"]) ? append [terminfo] ]
 
--- TODO: what do we do with parallel, stm, random, primitive, vector and dph?
 packagesStage1 :: Packages
 packagesStage1 = mconcat
     [ packagesStage0
@@ -35,7 +35,7 @@ packagesStage1 = mconcat
     , notM windowsHost ? append [iservBin]
     , buildHaddock     ? append [xhtml] ]
 
--- TODO: currently there is an unchecked assumption that we only build programs
+-- TODO: currently there is an unchecked assumption that we build only programs
 -- in Stage2 and Stage3. Can we check this in compile time?
 packagesStage2 :: Packages
 packagesStage2 = mconcat
@@ -43,9 +43,11 @@ packagesStage2 = mconcat
     , buildHaddock ? append [haddock] ]
 
 -- TODO: switch to Set Package as the order of packages should not matter?
+-- Otherwise we have to keep remembering to sort packages from time to time.
 knownPackages :: [Package]
 knownPackages = sort $ defaultKnownPackages ++ userKnownPackages
 
 -- Note: this is slow but we keep it simple as there are just ~50 packages
+-- TODO: speed up?
 findKnownPackage :: PackageName -> Maybe Package
 findKnownPackage name = find (\pkg -> pkgName pkg == name) knownPackages



More information about the ghc-commits mailing list