diff options
author | Jasper Van der Jeugt <m@jaspervdj.be> | 2012-12-13 22:25:28 +0100 |
---|---|---|
committer | Jasper Van der Jeugt <m@jaspervdj.be> | 2012-12-13 22:25:28 +0100 |
commit | cfac1bbca6e5950d8abdc8329e84de4794e08677 (patch) | |
tree | b0fc802c209dd1fd8ec59c0c490c115b9bd59651 /src/Hakyll/Web | |
parent | 089670629bc0f84c74fef520772caec842d2a549 (diff) | |
download | hakyll-cfac1bbca6e5950d8abdc8329e84de4794e08677.tar.gz |
Rename require to load, thanks @ddfreyne
Diffstat (limited to 'src/Hakyll/Web')
-rw-r--r-- | src/Hakyll/Web/Template.hs | 12 |
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 |