summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJasper Van der Jeugt <jaspervdj@gmail.com>2011-01-07 15:44:11 +0100
committerJasper Van der Jeugt <jaspervdj@gmail.com>2011-01-07 15:44:11 +0100
commitddb8ea219319f024df02bafe9ce2ed7d3a7ee41d (patch)
treef4f35971f0659039edf9f13b6e35e130a5c1c22f /src
parentc443d5c116b5bd62dfb4484bce784529678605e5 (diff)
downloadhakyll-ddb8ea219319f024df02bafe9ce2ed7d3a7ee41d.tar.gz
Metacompilers now work, except for "modified"
Diffstat (limited to 'src')
-rw-r--r--src/Hakyll/Core/Run.hs10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/Hakyll/Core/Run.hs b/src/Hakyll/Core/Run.hs
index e850d99..dea848b 100644
--- a/src/Hakyll/Core/Run.hs
+++ b/src/Hakyll/Core/Run.hs
@@ -100,7 +100,11 @@ addNewCompilers oldCompilers newCompilers = Hakyll $ do
-- Check which items are up-to-date. This only needs to happen for the new
-- compilers
- modified' <- liftIO $ modified provider store $ map fst compilers
+ oldModified <- hakyllModified <$> ask
+ newModified <- liftIO $ modified provider store $ map fst newCompilers
+ let modified' = oldModified `S.union` newModified
+
+ liftIO $ putStrLn $ show modified'
let -- Try to reduce the graph using this modified information
reducedGraph = filterObsolete modified' graph
@@ -111,12 +115,14 @@ addNewCompilers oldCompilers newCompilers = Hakyll $ do
-- Join the order with the compilers again
orderedCompilers = map (id &&& (compilerMap M.!)) ordered
+ liftIO $ putStrLn "Adding compilers..."
+
-- Now run the ordered list of compilers
local (updateModified modified') $ unHakyll $ runCompilers orderedCompilers
where
-- Add the modified information for the new compilers
updateModified modified' env = env
- { hakyllModified = hakyllModified env `S.union` modified'
+ { hakyllModified = modified'
}
runCompilers :: [(Identifier, Compiler () CompileRule)]