diff options
author | Jasper Van der Jeugt <jaspervdj@gmail.com> | 2011-01-04 13:09:45 +0100 |
---|---|---|
committer | Jasper Van der Jeugt <jaspervdj@gmail.com> | 2011-01-04 13:09:45 +0100 |
commit | 77c7d8dc17a86640180b9b233f6e0fd9008c6848 (patch) | |
tree | a9185023a15b6a1c65866b67d2bf1745721a1e53 /src/Hakyll/Core/Run.hs | |
parent | 0969fe41c7c94c34e5663ed231ecbb9e2c4bc051 (diff) | |
download | hakyll-77c7d8dc17a86640180b9b233f6e0fd9008c6848.tar.gz |
Add in-memory map to store
This allows us to get rid of the dependency
lookup map and use one uniform cache/lookup.
Diffstat (limited to 'src/Hakyll/Core/Run.hs')
-rw-r--r-- | src/Hakyll/Core/Run.hs | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/Hakyll/Core/Run.hs b/src/Hakyll/Core/Run.hs index 9e6a6ee..7121068 100644 --- a/src/Hakyll/Core/Run.hs +++ b/src/Hakyll/Core/Run.hs @@ -80,19 +80,18 @@ hakyllWith rules provider store = do putStrLn $ show ordered -- Generate all the targets in order - _ <- foldM (addTarget route' modified') M.empty orderedCompilers + _ <- mapM (addTarget route' modified') orderedCompilers putStrLn "DONE." where - addTarget route' modified' map' (id', comp) = do + addTarget route' modified' (id', comp) = do let url = runRoute route' id' -- Check if the resource was modified let isModified = id' `S.member` modified' -- Run the compiler - compiled <- runCompiler comp id' provider (dependencyLookup map') - url store isModified + compiled <- runCompiler comp id' provider url store isModified putStrLn $ "Generated target: " ++ show id' case url of @@ -104,9 +103,6 @@ hakyllWith rules provider store = do write path compiled putStrLn "" - return $ M.insert id' compiled map' - - dependencyLookup map' id' = M.lookup id' map' -- | Return a set of modified identifiers -- |