summaryrefslogtreecommitdiff
path: root/src/Hakyll/Core/Compiler
diff options
context:
space:
mode:
authorJasper Van der Jeugt <m@jaspervdj.be>2013-05-04 11:14:35 +0200
committerJasper Van der Jeugt <m@jaspervdj.be>2013-05-04 11:14:35 +0200
commit28bc3f1f3b98f3bf4c8601af8eb8fa7a9c226ed2 (patch)
treee39e82490c3ad607025a5f757e0183b0b8f71d4d /src/Hakyll/Core/Compiler
parent35e2db23399d7604f5440230165fb670a97f568b (diff)
parent7d489f314d553019c04905a912bc27448b4ec241 (diff)
downloadhakyll-28bc3f1f3b98f3bf4c8601af8eb8fa7a9c226ed2.tar.gz
Merge remote-tracking branch 'sphynx/master'
Diffstat (limited to 'src/Hakyll/Core/Compiler')
-rw-r--r--src/Hakyll/Core/Compiler/Internal.hs8
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)