summaryrefslogtreecommitdiff
path: root/src/Hakyll/Core/Compiler
diff options
context:
space:
mode:
authorJasper Van der Jeugt <m@jaspervdj.be>2013-03-24 19:21:33 +0100
committerJasper Van der Jeugt <m@jaspervdj.be>2013-03-24 19:21:33 +0100
commit6c8fda2c00bd14bf75c9fa1b98b09e283711a706 (patch)
tree3b9408c3f7f9bf71de04a3434ef1bb82fa9bf977 /src/Hakyll/Core/Compiler
parentcce87f08e5743722b3438c68dcdd2c890361f99c (diff)
downloadhakyll-6c8fda2c00bd14bf75c9fa1b98b09e283711a706.tar.gz
Fix issue in Compiler Alternative instance
Diffstat (limited to 'src/Hakyll/Core/Compiler')
-rw-r--r--src/Hakyll/Core/Compiler/Internal.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Hakyll/Core/Compiler/Internal.hs b/src/Hakyll/Core/Compiler/Internal.hs
index 267fe26..9aa441d 100644
--- a/src/Hakyll/Core/Compiler/Internal.hs
+++ b/src/Hakyll/Core/Compiler/Internal.hs
@@ -183,8 +183,9 @@ compilerCatch :: Compiler a -> (String -> Compiler a) -> Compiler a
compilerCatch (Compiler x) f = Compiler $ \r -> do
res <- x r
case res of
- CompilerError e -> unCompiler (f e) r
- _ -> return res
+ CompilerDone res' w -> return (CompilerDone res' w)
+ CompilerError e -> unCompiler (f e) r
+ CompilerRequire i c -> return (CompilerRequire i (compilerCatch c f))
{-# INLINE compilerCatch #-}