[commit: ghc] wip/nfs-locking: Make value sources more explicit (921dcce)

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


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

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

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

commit 921dcce1ab2e0cc1e6df25df98bb24f134fe0742
Author: David Luposchainsky <dluposchainsky at gmail.com>
Date:   Tue Jan 5 16:44:06 2016 +0100

    Make value sources more explicit
    
    [skip ci]
    
    Rather than relying on comments, move the documentation
    into the source, so it's checked by the compiler automatically


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

921dcce1ab2e0cc1e6df25df98bb24f134fe0742
 src/Main.hs | 40 ++++++++++++++++++++++------------------
 1 file changed, 22 insertions(+), 18 deletions(-)

diff --git a/src/Main.hs b/src/Main.hs
index 07f14ea..bacc8f1 100644
--- a/src/Main.hs
+++ b/src/Main.hs
@@ -1,24 +1,28 @@
-import Base
-import Rules
-import Rules.Cabal
-import Rules.Config
-import Rules.Generate
-import Rules.Libffi
-import Rules.IntegerGmp
-import Rules.Oracles
+module Main (main) where
+
+import qualified Base             as B
+import qualified Rules            as R
+import qualified Rules.Cabal      as RCabal
+import qualified Rules.Config     as RConfig
+import qualified Rules.Copy       as RCopy
+import qualified Rules.Generate   as RGen
+import qualified Rules.IntegerGmp as RInt
+import qualified Rules.Libffi     as RFfi
+import qualified Rules.Oracles    as ROracle
 
 main :: IO ()
-main = shakeArgs options $ do
-    cabalRules      -- see Rules.Cabal
-    configRules     -- see Rules.Config
-    copyRules       -- see Rules.Generate
-    generateTargets -- see Rules
-    generateRules   -- see Rules.Generate
-    libffiRules     -- see Rules.Libffi
-    integerGmpRules -- see Rules.IntegerGmp
-    oracleRules     -- see Rules.Oracles
-    packageRules    -- see Rules
+main = shakeArgs options rules
   where
+    rules = mconcat
+        [ RCabal.cabalRules
+        , RConfig.configRules
+        , RCopy.copyRules
+        , R.generateTargets
+        , RGen.generateRules
+        , RFfi.libffiRules
+        , RInt.integerGmpRules
+        , ROracle.oracleRules
+        , R.packageRules ]
     options = shakeOptions
         { shakeFiles    = shakeFilesPath
         , shakeProgress = progressSimple



More information about the ghc-commits mailing list