This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "snap".
The branch, 0.5 has been updated
via 77d6a673be32ede46797351a1ee1362fb2575185 (commit)
via df519d15bda8f119dd2283ef004588408857f9b1 (commit)
from f79699a12f9e45c9327feaa6d30c2231bb0df0e7 (commit)
Summary of changes:
project_template/default/src/Application.hs | 2 +-
src/Snap/Extension/Heist/Impl.hs | 9 ++++-----
2 files changed, 5 insertions(+), 6 deletions(-)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 77d6a673be32ede46797351a1ee1362fb2575185
Author: Mighty Byte <[email protected]>
Date: Sun Mar 20 11:55:56 2011 -0400
Fixed project template to match API change in previous commit.
diff --git a/project_template/default/src/Application.hs
b/project_template/default/src/Application.hs
index d1f5f63..7e77156 100644
--- a/project_template/default/src/Application.hs
+++ b/project_template/default/src/Application.hs
@@ -53,6 +53,6 @@ instance HasTimerState ApplicationState where
-- to worry about.
applicationInitializer :: Initializer ApplicationState
applicationInitializer = do
- heist <- heistInitializer "resources/templates" []
+ heist <- heistInitializer "resources/templates" id
timer <- timerInitializer
return $ ApplicationState heist timer
commit df519d15bda8f119dd2283ef004588408857f9b1
Author: Mighty Byte <[email protected]>
Date: Thu Mar 17 22:18:43 2011 -0400
Generalized heistInitializer to take a TemplateState modifying function
rather than a list of splices.
diff --git a/src/Snap/Extension/Heist/Impl.hs b/src/Snap/Extension/Heist/Impl.hs
index 2112011..e1b5bfb 100644
--- a/src/Snap/Extension/Heist/Impl.hs
+++ b/src/Snap/Extension/Heist/Impl.hs
@@ -123,13 +123,12 @@ class MonadSnap m => HasHeistState m s | s -> m where
heistInitializer :: MonadSnap m
=> FilePath
-- ^ Path to a template directory containing @.tpl@ files
- -> [(Text, Splice m)]
- -- ^ List of splices to make available to the templates
+ -> (TemplateState m -> TemplateState m)
+ -- ^ Function to modify the initial template state
-> Initializer (HeistState m)
-heistInitializer p splices = do
+heistInitializer p modTS = do
heistState <- liftIO $ do
- (origTs,sts) <- bindStaticTag $ bindSplices splices
- $ emptyTemplateState p
+ (origTs,sts) <- bindStaticTag $ modTS $ emptyTemplateState p
loadTemplates p origTs >>= either error (\ts -> do
tsMVar <- newMVar ts
return $ HeistState p origTs tsMVar sts id)
-----------------------------------------------------------------------
hooks/post-receive
--
snap
_______________________________________________
Snap mailing list
[email protected]
http://mailman-mail5.webfaction.com/listinfo/snap