summaryrefslogtreecommitdiff
path: root/src/Hakyll/Core/Compiler
diff options
context:
space:
mode:
authorJasper Van der Jeugt <jaspervdj@gmail.com>2010-12-31 12:38:12 +0100
committerJasper Van der Jeugt <jaspervdj@gmail.com>2010-12-31 12:38:12 +0100
commit5b67f20eab333a0a63eddae93fa114d8f5158c61 (patch)
tree56dd5a9f9dfb42cf250dd2160b57d30b50506220 /src/Hakyll/Core/Compiler
parent70c7363b8c1ad250c5f68993867015ef68a8b46c (diff)
downloadhakyll-5b67f20eab333a0a63eddae93fa114d8f5158c61.tar.gz
Prototype of the 'cached' arrow transformer
Diffstat (limited to 'src/Hakyll/Core/Compiler')
-rw-r--r--src/Hakyll/Core/Compiler/Internal.hs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Hakyll/Core/Compiler/Internal.hs b/src/Hakyll/Core/Compiler/Internal.hs
index eee67ef..4209bdc 100644
--- a/src/Hakyll/Core/Compiler/Internal.hs
+++ b/src/Hakyll/Core/Compiler/Internal.hs
@@ -24,6 +24,7 @@ import Control.Arrow (Arrow, arr, first)
import Hakyll.Core.Identifier
import Hakyll.Core.CompiledItem
import Hakyll.Core.ResourceProvider
+import Hakyll.Core.Store
-- | A set of dependencies
--
@@ -40,6 +41,7 @@ data CompilerEnvironment = CompilerEnvironment
, compilerResourceProvider :: ResourceProvider -- ^ Resource provider
, compilerDependencyLookup :: DependencyLookup -- ^ Dependency lookup
, compilerRoute :: Maybe FilePath -- ^ Site route
+ , compilerStore :: Store -- ^ Compiler store
}
-- | The compiler monad
@@ -73,8 +75,9 @@ runCompilerJob :: Compiler () a -- ^ Compiler to run
-> ResourceProvider -- ^ Resource provider
-> DependencyLookup -- ^ Dependency lookup table
-> Maybe FilePath -- ^ Route
+ -> Store -- ^ Store
-> IO a
-runCompilerJob compiler identifier provider lookup' route =
+runCompilerJob compiler identifier provider lookup' route store =
runReaderT (unCompilerM $ compilerJob compiler ()) env
where
env = CompilerEnvironment
@@ -82,6 +85,7 @@ runCompilerJob compiler identifier provider lookup' route =
, compilerResourceProvider = provider
, compilerDependencyLookup = lookup'
, compilerRoute = route
+ , compilerStore = store
}
runCompilerDependencies :: Compiler () a