summaryrefslogtreecommitdiff
path: root/src/Hakyll/Core/Compiler.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Hakyll/Core/Compiler.hs')
-rw-r--r--src/Hakyll/Core/Compiler.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Hakyll/Core/Compiler.hs b/src/Hakyll/Core/Compiler.hs
index a672395..a6814f9 100644
--- a/src/Hakyll/Core/Compiler.hs
+++ b/src/Hakyll/Core/Compiler.hs
@@ -29,6 +29,7 @@ module Hakyll.Core.Compiler
--------------------------------------------------------------------------------
import Control.Applicative ((<$>))
+import Control.Monad (when)
import Data.Binary (Binary)
import Data.ByteString.Lazy (ByteString)
import Data.Typeable (Typeable)
@@ -76,8 +77,9 @@ getRoute identifier = do
routes <- compilerRoutes <$> compilerAsk
-- Note that this makes us dependend on that identifier: when the metadata
-- of that item changes, the route may change, hence we have to recompile
- compilerTellDependencies [IdentifierDependency identifier]
- compilerUnsafeIO $ runRoutes routes provider identifier
+ (mfp, um) <- compilerUnsafeIO $ runRoutes routes provider identifier
+ when um $ compilerTellDependencies [IdentifierDependency identifier]
+ return mfp
--------------------------------------------------------------------------------