summaryrefslogtreecommitdiff
path: root/src/Text/Hakyll/HakyllMonad.hs
diff options
context:
space:
mode:
authorJasper Van der Jeugt <jaspervdj@gmail.com>2010-08-02 13:48:08 +0200
committerJasper Van der Jeugt <jaspervdj@gmail.com>2010-08-02 13:48:08 +0200
commit2c8d76cd97e670fdfd216e2288b8cc6633287046 (patch)
tree0b02dee018a828fd34e09eb612f7f13ab92f479c /src/Text/Hakyll/HakyllMonad.hs
parent2066be06213cd70fdeae42a6194bc645a15d9835 (diff)
downloadhakyll-2c8d76cd97e670fdfd216e2288b8cc6633287046.tar.gz
Add a simple static configuration
Diffstat (limited to 'src/Text/Hakyll/HakyllMonad.hs')
-rw-r--r--src/Text/Hakyll/HakyllMonad.hs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/Text/Hakyll/HakyllMonad.hs b/src/Text/Hakyll/HakyllMonad.hs
index 3ec78c4..2140ea7 100644
--- a/src/Text/Hakyll/HakyllMonad.hs
+++ b/src/Text/Hakyll/HakyllMonad.hs
@@ -5,11 +5,14 @@ module Text.Hakyll.HakyllMonad
, Hakyll
, askHakyll
, getAdditionalContext
+ , logHakyll
) where
+import Control.Monad.Trans (liftIO)
import Control.Monad.Reader (ReaderT, ask)
import Control.Monad (liftM)
import qualified Data.Map as M
+import System.IO (hPutStrLn, stderr)
import Text.Pandoc (ParserState, WriterOptions)
@@ -65,3 +68,8 @@ getAdditionalContext :: HakyllConfiguration -> Context
getAdditionalContext configuration =
let (Context c) = additionalContext configuration
in Context $ M.insert "absolute" (absoluteUrl configuration) c
+
+-- | Write some log information.
+--
+logHakyll :: String -> Hakyll ()
+logHakyll = liftIO . hPutStrLn stderr