diff options
Diffstat (limited to 'lib/Hakyll/Core/Compiler')
-rw-r--r-- | lib/Hakyll/Core/Compiler/Internal.hs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/Hakyll/Core/Compiler/Internal.hs b/lib/Hakyll/Core/Compiler/Internal.hs index 762630c..3b62e2d 100644 --- a/lib/Hakyll/Core/Compiler/Internal.hs +++ b/lib/Hakyll/Core/Compiler/Internal.hs @@ -40,6 +40,7 @@ module Hakyll.Core.Compiler.Internal import Control.Applicative (Alternative (..)) import Control.Exception (SomeException, handle) import Control.Monad (forM_) +import qualified Control.Monad.Fail as Fail import Control.Monad.Except (MonadError (..)) import Data.List.NonEmpty (NonEmpty (..)) import qualified Data.List.NonEmpty as NonEmpty @@ -183,9 +184,14 @@ instance Monad Compiler where CompilerError e -> return $ CompilerError e {-# INLINE (>>=) #-} - fail = compilerThrow . return +#if !(MIN_VERSION_base(4,13,0)) + fail = Fail.fail {-# INLINE fail #-} +#endif +instance Fail.MonadFail Compiler where + fail = compilerThrow . return + {-# INLINE fail #-} -------------------------------------------------------------------------------- instance Applicative Compiler where |