summaryrefslogtreecommitdiff
path: root/src/Hakyll/Web
diff options
context:
space:
mode:
authorJasper Van der Jeugt <m@jaspervdj.be>2012-12-13 22:25:28 +0100
committerJasper Van der Jeugt <m@jaspervdj.be>2012-12-13 22:25:28 +0100
commitcfac1bbca6e5950d8abdc8329e84de4794e08677 (patch)
treeb0fc802c209dd1fd8ec59c0c490c115b9bd59651 /src/Hakyll/Web
parent089670629bc0f84c74fef520772caec842d2a549 (diff)
downloadhakyll-cfac1bbca6e5950d8abdc8329e84de4794e08677.tar.gz
Rename require to load, thanks @ddfreyne
Diffstat (limited to 'src/Hakyll/Web')
-rw-r--r--src/Hakyll/Web/Template.hs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Hakyll/Web/Template.hs b/src/Hakyll/Web/Template.hs
index b793652..761c3ad 100644
--- a/src/Hakyll/Web/Template.hs
+++ b/src/Hakyll/Web/Template.hs
@@ -40,7 +40,7 @@ module Hakyll.Web.Template
( Template
, templateCompiler
, applyTemplate
- , requireApplyTemplate
+ , loadAndApplyTemplate
, applyAsTemplate
, applyTemplateWith
) where
@@ -82,20 +82,20 @@ applyTemplate tpl context item = do
--------------------------------------------------------------------------------
-- | The following pattern is so common:
--
--- > tpl <- requireBody "templates/foo.html"
+-- > tpl <- loadBody "templates/foo.html"
-- > someCompiler
-- > >>= applyTemplate tpl context
--
-- That we have a single function which does this:
--
-- > someCompiler
--- > >>= requireApplyTemplate "templates/foo.html" context
-requireApplyTemplate :: Identifier -- ^ Template identifier
+-- > >>= loadAndApplyTemplate "templates/foo.html" context
+loadAndApplyTemplate :: Identifier -- ^ Template identifier
-> Context a -- ^ Context
-> Item a -- ^ Page
-> Compiler (Item String) -- ^ Resulting item
-requireApplyTemplate identifier context item = do
- tpl <- requireBody identifier
+loadAndApplyTemplate identifier context item = do
+ tpl <- loadBody identifier
applyTemplate tpl context item