diff options
author | Jasper Van der Jeugt <m@jaspervdj.be> | 2013-05-04 11:14:35 +0200 |
---|---|---|
committer | Jasper Van der Jeugt <m@jaspervdj.be> | 2013-05-04 11:14:35 +0200 |
commit | 28bc3f1f3b98f3bf4c8601af8eb8fa7a9c226ed2 (patch) | |
tree | e39e82490c3ad607025a5f757e0183b0b8f71d4d /src/Hakyll/Core/Compiler | |
parent | 35e2db23399d7604f5440230165fb670a97f568b (diff) | |
parent | 7d489f314d553019c04905a912bc27448b4ec241 (diff) | |
download | hakyll-28bc3f1f3b98f3bf4c8601af8eb8fa7a9c226ed2.tar.gz |
Merge remote-tracking branch 'sphynx/master'
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) |