Finalise generation of build rules from contexts.
authorAndrey Mokhov <andrey.mokhov@gmail.com>
Tue, 16 Feb 2016 03:08:24 +0000 (03:08 +0000)
committerAndrey Mokhov <andrey.mokhov@gmail.com>
Tue, 16 Feb 2016 03:08:24 +0000 (03:08 +0000)
See #207.

src/Rules.hs
src/Rules/Register.hs

index 4592b4a..74ffe30 100644 (file)
@@ -72,13 +72,9 @@ packageRules = do
         [ buildPackageData
         , buildPackageDependencies readPackageDb
         , buildPackageDocumentation
-        , generatePackageCode ]
-
-    for_ allStages $ \stage ->
-        for_ knownPackages $ \package -> do
-            let context = vanillaContext stage package
-            buildProgram                             context
-            registerPackage           writePackageDb context
+        , generatePackageCode
+        , buildProgram
+        , registerPackage writePackageDb ]
 
 buildRules :: Rules ()
 buildRules = do
index 2bbfcfc..01d8ab9 100644 (file)
@@ -13,7 +13,6 @@ import Settings
 import Settings.Packages.Rts
 import Target
 
--- TODO: Use way from Context, #207
 -- Build package-data.mk by using GhcCabal to process pkgCabal file
 registerPackage :: [(Resource, Int)] -> Context -> Rules ()
 registerPackage rs context @ (Context {..}) = do