diff options
author | Jasper Van der Jeugt <m@jaspervdj.be> | 2016-04-06 14:26:46 +0200 |
---|---|---|
committer | Jasper Van der Jeugt <m@jaspervdj.be> | 2016-04-06 14:26:46 +0200 |
commit | e81468e0f64fdbe05794d5f8ccaebc00ee474ee2 (patch) | |
tree | 882c422a312ed3e6eb8eaacfcc9c292a09296845 /src/Hakyll/Core/Provider/MetadataCache.hs | |
parent | 3f3e09672d3d279bc5cbaa8b3ac7508abc98aa2d (diff) | |
download | hakyll-e81468e0f64fdbe05794d5f8ccaebc00ee474ee2.tar.gz |
Initial YAML support
See #225
Diffstat (limited to 'src/Hakyll/Core/Provider/MetadataCache.hs')
-rw-r--r-- | src/Hakyll/Core/Provider/MetadataCache.hs | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/Hakyll/Core/Provider/MetadataCache.hs b/src/Hakyll/Core/Provider/MetadataCache.hs index 28d2bd5..46dbf3e 100644 --- a/src/Hakyll/Core/Provider/MetadataCache.hs +++ b/src/Hakyll/Core/Provider/MetadataCache.hs @@ -8,9 +8,6 @@ module Hakyll.Core.Provider.MetadataCache -------------------------------------------------------------------------------- import Control.Monad (unless) -import qualified Data.Map as M - --------------------------------------------------------------------------------- import Hakyll.Core.Identifier import Hakyll.Core.Metadata import Hakyll.Core.Provider.Internal @@ -21,11 +18,11 @@ import qualified Hakyll.Core.Store as Store -------------------------------------------------------------------------------- resourceMetadata :: Provider -> Identifier -> IO Metadata resourceMetadata p r - | not (resourceExists p r) = return M.empty + | not (resourceExists p r) = return mempty | otherwise = do -- TODO keep time in md cache load p r - Store.Found md <- Store.get (providerStore p) + Store.Found (BinaryMetadata md) <- Store.get (providerStore p) [name, toFilePath r, "metadata"] return md @@ -52,7 +49,7 @@ load p r = do mmof <- Store.isMember store mdk unless mmof $ do (md, body) <- loadMetadata p r - Store.set store mdk md + Store.set store mdk (BinaryMetadata md) Store.set store bk body where store = providerStore p |