[commit: ghc] wip/nfs-locking: Minor revision (223d161)

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


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

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

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

commit 223d16102070b2d1061197ebb111ca3c9d2ffd45
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date:   Sun Oct 30 13:28:09 2016 +0000

    Minor revision


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

223d16102070b2d1061197ebb111ca3c9d2ffd45
 src/Settings/Default.hs | 163 +++++++++++++++++++++++-------------------------
 1 file changed, 77 insertions(+), 86 deletions(-)

diff --git a/src/Settings/Default.hs b/src/Settings/Default.hs
index 9f61ff7..b59ceeb 100644
--- a/src/Settings/Default.hs
+++ b/src/Settings/Default.hs
@@ -43,46 +43,6 @@ import Settings.Packages.Touchy
 import Settings.Packages.Unlit
 import UserSettings
 
--- | All 'Builder'-dependent command line arguments.
-defaultBuilderArgs :: Args
-defaultBuilderArgs = mconcat
-    [ alexBuilderArgs
-    , arBuilderArgs
-    , ccBuilderArgs
-    , configureBuilderArgs
-    , deriveConstantsBuilderArgs
-    , genPrimopCodeBuilderArgs
-    , ghcBuilderArgs
-    , ghcCabalBuilderArgs
-    , ghcCabalHsColourBuilderArgs
-    , ghcMBuilderArgs
-    , ghcPkgBuilderArgs
-    , haddockBuilderArgs
-    , happyBuilderArgs
-    , hsc2hsBuilderArgs
-    , hsCppBuilderArgs
-    , ldBuilderArgs
-    , makeBuilderArgs
-    , tarBuilderArgs ]
-
--- | All 'Package'-dependent command line arguments.
-defaultPackageArgs :: Args
-defaultPackageArgs = mconcat
-    [ basePackageArgs
-    , compilerPackageArgs
-    , directoryPackageArgs
-    , ghcPackageArgs
-    , ghcCabalPackageArgs
-    , ghcPrimPackageArgs
-    , haddockPackageArgs
-    , hp2psPackageArgs
-    , integerGmpPackageArgs
-    , iservBinPackageArgs
-    , rtsPackageArgs
-    , runGhcPackageArgs
-    , touchyPackageArgs
-    , unlitPackageArgs ]
-
 -- | All default command line arguments.
 defaultArgs :: Args
 defaultArgs = mconcat
@@ -93,10 +53,12 @@ defaultArgs = mconcat
 -- | Packages that are built by default. You can change this by editing
 -- 'userPackages' in "UserSettings".
 defaultPackages :: Packages
-defaultPackages = mconcat [ packagesStage0, packagesStage1, packagesStage2 ]
+defaultPackages = mconcat [ stage0 ? stage0Packages
+                          , stage1 ? stage1Packages
+                          , stage2 ? stage2Packages ]
 
-packagesStage0 :: Packages
-packagesStage0 = stage0 ? do
+stage0Packages :: Packages
+stage0Packages = do
     win <- lift windowsHost
     ios <- lift iosHost
     append $ [ binary
@@ -122,52 +84,41 @@ packagesStage0 = stage0 ? do
              [ terminfo | not win, not ios ] ++
              [ touchy   | win              ]
 
-packagesStage1 :: Packages
-packagesStage1 = stage1 ? do
+stage1Packages :: Packages
+stage1Packages = do
     win <- lift windowsHost
-    ios <- lift iosHost
     doc <- buildHaddock flavour
-    append $ [ array
-             , base
-             , binary
-             , bytestring
-             , cabal
-             , containers
-             , compareSizes
-             , compiler
-             , deepseq
-             , directory
-             , filepath
-             , ghc
-             , ghcBoot
-             , ghcBootTh
-             , ghcCabal
-             , ghci
-             , ghcPkg
-             , ghcPrim
-             , haskeline
-             , hoopl
-             , hpc
-             , hpcBin
-             , hsc2hs
-             , integerLibrary
-             , pretty
-             , process
-             , rts
-             , runGhc
-             , templateHaskell
-             , time
-             , transformers                ] ++
-             [ iservBin | not win          ] ++
-             [ terminfo | not win, not ios ] ++
-             [ unix     | not win          ] ++
-             [ win32    | win              ] ++
-             [ xhtml    | doc              ]
+    mconcat [ stage0Packages
+            , apply (filter isLibrary) -- Build all Stage0 libraries in Stage1
+            , append $ [ array
+                       , base
+                       , bytestring
+                       , containers
+                       , compareSizes
+                       , deepseq
+                       , directory
+                       , filepath
+                       , ghc
+                       , ghcCabal
+                       , ghci
+                       , ghcPkg
+                       , ghcPrim
+                       , haskeline
+                       , hpcBin
+                       , hsc2hs
+                       , integerLibrary
+                       , pretty
+                       , process
+                       , rts
+                       , runGhc
+                       , time               ] ++
+                       [ iservBin | not win ] ++
+                       [ unix     | not win ] ++
+                       [ win32    | win     ] ++
+                       [ xhtml    | doc     ] ]
 
--- 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 = stage2 ? do
+stage2Packages :: Packages
+stage2Packages = do
     doc <- buildHaddock flavour
     append $ [ checkApiAnnotations
              , ghcTags       ] ++
@@ -220,3 +171,43 @@ defaultSplitObjects = do
     supported <- lift supportsSplitObjects
     let goodPackage = isLibrary pkg && pkg /= compiler && pkg /= rts
     return $ cmdSplitObjects && goodStage && goodPackage && supported
+
+-- | All 'Builder'-dependent command line arguments.
+defaultBuilderArgs :: Args
+defaultBuilderArgs = mconcat
+    [ alexBuilderArgs
+    , arBuilderArgs
+    , ccBuilderArgs
+    , configureBuilderArgs
+    , deriveConstantsBuilderArgs
+    , genPrimopCodeBuilderArgs
+    , ghcBuilderArgs
+    , ghcCabalBuilderArgs
+    , ghcCabalHsColourBuilderArgs
+    , ghcMBuilderArgs
+    , ghcPkgBuilderArgs
+    , haddockBuilderArgs
+    , happyBuilderArgs
+    , hsc2hsBuilderArgs
+    , hsCppBuilderArgs
+    , ldBuilderArgs
+    , makeBuilderArgs
+    , tarBuilderArgs ]
+
+-- | All 'Package'-dependent command line arguments.
+defaultPackageArgs :: Args
+defaultPackageArgs = mconcat
+    [ basePackageArgs
+    , compilerPackageArgs
+    , directoryPackageArgs
+    , ghcPackageArgs
+    , ghcCabalPackageArgs
+    , ghcPrimPackageArgs
+    , haddockPackageArgs
+    , hp2psPackageArgs
+    , integerGmpPackageArgs
+    , iservBinPackageArgs
+    , rtsPackageArgs
+    , runGhcPackageArgs
+    , touchyPackageArgs
+    , unlitPackageArgs ]



More information about the ghc-commits mailing list