diff options
| author | Jasper Van der Jeugt <jaspervdj@gmail.com> | 2011-02-21 13:02:35 +0100 |
|---|---|---|
| committer | Jasper Van der Jeugt <jaspervdj@gmail.com> | 2011-02-21 13:02:35 +0100 |
| commit | 8b57ab509f9fbf7bb2058251beb60f39e8b476ca (patch) | |
| tree | 0c11af36b6c38ac1cffab879dc954e48413be889 /src/Hakyll/Core/Compiler | |
| parent | 12a0e5387bc74dd3043513d12698c3f2a25fa371 (diff) | |
| download | hakyll-8b57ab509f9fbf7bb2058251beb60f39e8b476ca.tar.gz | |
Add logger to Compiler monad
Diffstat (limited to 'src/Hakyll/Core/Compiler')
| -rw-r--r-- | src/Hakyll/Core/Compiler/Internal.hs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/Hakyll/Core/Compiler/Internal.hs b/src/Hakyll/Core/Compiler/Internal.hs index a524a66..30a391f 100644 --- a/src/Hakyll/Core/Compiler/Internal.hs +++ b/src/Hakyll/Core/Compiler/Internal.hs @@ -26,6 +26,7 @@ import Hakyll.Core.Identifier import Hakyll.Core.ResourceProvider import Hakyll.Core.Store import Hakyll.Core.Routes +import Hakyll.Core.Logger -- | A set of dependencies -- @@ -44,6 +45,8 @@ data CompilerEnvironment = CompilerEnvironment compilerStore :: Store , -- | Flag indicating if the underlying resource was modified compilerResourceModified :: Bool + , -- | Logger + compilerLogger :: Logger } -- | The compiler monad @@ -91,8 +94,9 @@ runCompilerJob :: Compiler () a -- ^ Compiler to run -> Routes -- ^ Route -> Store -- ^ Store -> Bool -- ^ Was the resource modified? + -> Logger -- ^ Logger -> IO a -runCompilerJob compiler identifier provider route store modified = +runCompilerJob compiler identifier provider route store modified logger = runReaderT (unCompilerM $ compilerJob compiler ()) env where env = CompilerEnvironment @@ -101,6 +105,7 @@ runCompilerJob compiler identifier provider route store modified = , compilerRoutes = route , compilerStore = store , compilerResourceModified = modified + , compilerLogger = logger } runCompilerDependencies :: Compiler () a |
