@@ -43,8 +43,11 @@ runCompiler :: Compiler () CompiledItem -- ^ Compiler to run
43 -> Bool -- ^ Was the resource modified?
43 -> Bool -- ^ Was the resource modified?
44 -> IO CompiledItem -- ^ Resulting item
44 -> IO CompiledItem -- ^ Resulting item
45runCompiler compiler identifier provider lookup' route store modified = do
45runCompiler compiler identifier provider lookup' route store modified = do
46+ -- Run the compiler job
46 CompiledItem result <- runCompilerJob
47 CompiledItem result <- runCompilerJob
47 compiler identifier provider lookup' route store modified
48 compiler identifier provider lookup' route store modified
50+ -- Store a copy in the cache and return
48 storeSet store "Hakyll.Core.Compiler.runCompiler" identifier result
51 storeSet store "Hakyll.Core.Compiler.runCompiler" identifier result
49 return $ CompiledItem result
52 return $ CompiledItem result
@@ -81,7 +84,9 @@ getDependencyOrResult identifier = CompilerM $ do
81 Nothing -> fmap (fromMaybe error') $ liftIO $
84 Nothing -> fmap (fromMaybe error') $ liftIO $
82 storeGet store "Hakyll.Core.Compiler.runCompiler" identifier
85 storeGet store "Hakyll.Core.Compiler.runCompiler" identifier
84− error' = error "Hakyll.Core.Compiler.getDependency: Not found"
87+ error' = error $ "Hakyll.Core.Compiler.getDependency: "
89+ ++ " not found in the cache, the cache might be corrupted"
86-- | Require another target. Using this function ensures automatic handling of
91-- | Require another target. Using this function ensures automatic handling of
87-- dependencies
92-- dependencies