diff options
Diffstat (limited to 'src/Hakyll/Core/Compiler')
-rw-r--r-- | src/Hakyll/Core/Compiler/Internal.hs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/Hakyll/Core/Compiler/Internal.hs b/src/Hakyll/Core/Compiler/Internal.hs index bf384bf..fbb7528 100644 --- a/src/Hakyll/Core/Compiler/Internal.hs +++ b/src/Hakyll/Core/Compiler/Internal.hs @@ -2,6 +2,8 @@ -- | Internally used compiler module {-# LANGUAGE GADTs #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE MultiParamTypeClasses #-} module Hakyll.Core.Compiler.Internal ( -- * Types CompilerRead (..) @@ -29,6 +31,7 @@ import Control.Applicative (Alternative (..), Applicative (..), (<$>)) import Control.Exception (SomeException, handle) import Control.Monad (forM_) +import Control.Monad.Error import Data.Monoid (Monoid (..)) import Data.Set (Set) import qualified Data.Set as S @@ -146,6 +149,11 @@ instance MonadMetadata Compiler where getMetadata = compilerGetMetadata getMatches = compilerGetMatches +-------------------------------------------------------------------------------- +instance MonadError [String] Compiler where + throwError = compilerThrow + catchError = compilerCatch + -------------------------------------------------------------------------------- runCompiler :: Compiler a -> CompilerRead -> IO (CompilerResult a) |