[commit: ghc] wip/nfs-locking: Move Rules/Package.hs into Rules.hs. (a10669a)

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


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

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

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

commit a10669a6788da387e9e5a3e6fe35383589f22ac1
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date:   Sun Feb 14 23:21:54 2016 +0000

    Move Rules/Package.hs into Rules.hs.


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

a10669a6788da387e9e5a3e6fe35383589f22ac1
 shaking-up-ghc.cabal |  1 -
 src/Rules.hs         | 21 +++++++++++++++++++--
 src/Rules/Package.hs | 24 ------------------------
 3 files changed, 19 insertions(+), 27 deletions(-)

diff --git a/shaking-up-ghc.cabal b/shaking-up-ghc.cabal
index 6435d30..193b04e 100644
--- a/shaking-up-ghc.cabal
+++ b/shaking-up-ghc.cabal
@@ -58,7 +58,6 @@ executable ghc-shake
                        , Rules.Libffi
                        , Rules.Library
                        , Rules.Oracles
-                       , Rules.Package
                        , Rules.Perl
                        , Rules.Program
                        , Rules.Register
diff --git a/src/Rules.hs b/src/Rules.hs
index 5cbfa7e..cea2c0d 100644
--- a/src/Rules.hs
+++ b/src/Rules.hs
@@ -5,13 +5,19 @@ import Data.Foldable
 import Base
 import Expression
 import GHC
+import qualified Rules.Compile
+import qualified Rules.Data
+import qualified Rules.Dependencies
+import qualified Rules.Documentation
 import qualified Rules.Generate
-import qualified Rules.Package
 import qualified Rules.Resources
 import qualified Rules.Cabal
 import qualified Rules.Gmp
 import qualified Rules.Libffi
+import qualified Rules.Library
 import qualified Rules.Perl
+import qualified Rules.Program
+import qualified Rules.Register
 import qualified Rules.Setup
 import Settings
 
@@ -50,7 +56,18 @@ packageRules = do
     resources <- Rules.Resources.resourceRules
     for_ allStages $ \stage ->
         for_ knownPackages $ \pkg ->
-            Rules.Package.buildPackage resources $ vanillaContext stage pkg
+            buildPackage resources $ vanillaContext stage pkg
+
+buildPackage :: Rules.Resources.Resources -> Context -> Rules ()
+buildPackage = mconcat
+    [ Rules.Compile.compilePackage
+    , Rules.Data.buildPackageData
+    , Rules.Dependencies.buildPackageDependencies
+    , Rules.Documentation.buildPackageDocumentation
+    , Rules.Generate.generatePackageCode
+    , Rules.Library.buildPackageLibrary
+    , Rules.Program.buildProgram
+    , Rules.Register.registerPackage ]
 
 buildRules :: Rules ()
 buildRules = mconcat
diff --git a/src/Rules/Package.hs b/src/Rules/Package.hs
deleted file mode 100644
index 26de923..0000000
--- a/src/Rules/Package.hs
+++ /dev/null
@@ -1,24 +0,0 @@
-module Rules.Package (buildPackage) where
-
-import Base
-import Context
-import qualified Rules.Compile
-import qualified Rules.Data
-import qualified Rules.Dependencies
-import qualified Rules.Documentation
-import qualified Rules.Generate
-import qualified Rules.Library
-import qualified Rules.Program
-import qualified Rules.Register
-import Rules.Resources
-
-buildPackage :: Resources -> Context -> Rules ()
-buildPackage = mconcat
-    [ Rules.Compile.compilePackage
-    , Rules.Data.buildPackageData
-    , Rules.Dependencies.buildPackageDependencies
-    , Rules.Documentation.buildPackageDocumentation
-    , Rules.Generate.generatePackageCode
-    , Rules.Library.buildPackageLibrary
-    , Rules.Program.buildProgram
-    , Rules.Register.registerPackage ]



More information about the ghc-commits mailing list