From 6c8fda2c00bd14bf75c9fa1b98b09e283711a706 Mon Sep 17 00:00:00 2001 From: Jasper Van der Jeugt Date: Sun, 24 Mar 2013 19:21:33 +0100 Subject: Fix issue in Compiler Alternative instance --- src/Hakyll/Core/Compiler/Internal.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') 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 #-} -- cgit v1.2.3