on master help sign in
Metacompilers now work, except for "modified"
ddb8ea2Jasper Van der Jeugt
src/Hakyll/Core/Run.hs+8−2
@@ -100,7 +100,11 @@ addNewCompilers oldCompilers newCompilers = Hakyll $ do
100
100
101 -- Check which items are up-to-date. This only needs to happen for the new
101 -- Check which items are up-to-date. This only needs to happen for the new
102 -- compilers
102 -- compilers
103+ oldModified <- hakyllModified <$> ask
103− modified' <- liftIO $ modified provider store $ map fst compilers
104+ newModified <- liftIO $ modified provider store $ map fst newCompilers
105+ let modified' = oldModified `S.union` newModified
106+
107+ liftIO $ putStrLn $ show modified'
104
108
105 let -- Try to reduce the graph using this modified information
109 let -- Try to reduce the graph using this modified information
106 reducedGraph = filterObsolete modified' graph
110 reducedGraph = filterObsolete modified' graph
@@ -111,12 +115,14 @@ addNewCompilers oldCompilers newCompilers = Hakyll $ do
111 -- Join the order with the compilers again
115 -- Join the order with the compilers again
112 orderedCompilers = map (id &&& (compilerMap M.!)) ordered
116 orderedCompilers = map (id &&& (compilerMap M.!)) ordered
113
117
118+ liftIO $ putStrLn "Adding compilers..."
119+
114 -- Now run the ordered list of compilers
120 -- Now run the ordered list of compilers
115 local (updateModified modified') $ unHakyll $ runCompilers orderedCompilers
121 local (updateModified modified') $ unHakyll $ runCompilers orderedCompilers
116 where
122 where
117 -- Add the modified information for the new compilers
123 -- Add the modified information for the new compilers
118 updateModified modified' env = env
124 updateModified modified' env = env
119− { hakyllModified = hakyllModified env `S.union` modified'
125+ { hakyllModified = modified'
120 }
126 }
121
127
122runCompilers :: [(Identifier, Compiler () CompileRule)]
128runCompilers :: [(Identifier, Compiler () CompileRule)]