diff options
author | Jasper Van der Jeugt <m@jaspervdj.be> | 2012-11-08 12:45:26 +0100 |
---|---|---|
committer | Jasper Van der Jeugt <m@jaspervdj.be> | 2012-11-08 12:45:26 +0100 |
commit | 89f324f81b40d6818e6307794fe06b60053adbc0 (patch) | |
tree | e8c4f7fb869597ede5f283913cd0633be6830af6 /src/Hakyll/Core/Run.hs | |
parent | e5c97d978bf34bdc98d97bf42ee2be29a5af4242 (diff) | |
download | hakyll-89f324f81b40d6818e6307794fe06b60053adbc0.tar.gz |
Pick metadata parsing from old develop
Diffstat (limited to 'src/Hakyll/Core/Run.hs')
-rw-r--r-- | src/Hakyll/Core/Run.hs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/Hakyll/Core/Run.hs b/src/Hakyll/Core/Run.hs index 0bc3625..a777d0a 100644 --- a/src/Hakyll/Core/Run.hs +++ b/src/Hakyll/Core/Run.hs @@ -27,7 +27,6 @@ import Hakyll.Core.Identifier import Hakyll.Core.Logger import Hakyll.Core.Resource import Hakyll.Core.Resource.Provider -import Hakyll.Core.Resource.Provider.File import Hakyll.Core.Routes import Hakyll.Core.Rules.Internal import Hakyll.Core.Store (Store) @@ -44,8 +43,8 @@ run configuration rules = do section logger "Initialising" store <- timed logger "Creating store" $ Store.new (inMemoryCache configuration) $ storeDirectory configuration - provider <- timed logger "Creating provider" $ - fileResourceProvider configuration + provider <- timed logger "Creating provider" $ newResourceProvider + store (ignoreFile configuration) "." -- Fetch the old graph from the store. If we don't find it, we consider this -- to be the first run @@ -114,7 +113,6 @@ addNewCompilers newCompilers = Runtime $ do logger <- hakyllLogger <$> ask section logger "Adding new compilers" provider <- hakyllResourceProvider <$> ask - store <- hakyllStore <$> ask firstRun <- hakyllFirstRun <$> ask -- Old state information @@ -134,7 +132,7 @@ addNewCompilers newCompilers = Runtime $ do -- Check which items have been modified modified <- fmap S.fromList $ flip filterM (map fst newCompilers) $ - liftIO . resourceModified provider store . fromIdentifier + liftIO . resourceModified provider . fromIdentifier let checkModified = if firstRun then const True else (`S.member` modified) -- Create a new analyzer and append it to the currect one @@ -185,7 +183,7 @@ build id' = Runtime $ do let compiler = compilers M.! id' -- Check if the resource was modified - isModified <- liftIO $ resourceModified provider store $ fromIdentifier id' + isModified <- liftIO $ resourceModified provider $ fromIdentifier id' -- Run the compiler result <- timed logger "Total compile time" $ liftIO $ |