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, master has been updated
via 202ec897c93d8c40a2538c140ba66b1e4c06efaa (commit)
from 34d7fc488e0aaf1433de4c278166ead7323366b5 (commit)
Summary of changes:
project_template/hint/src/AppState.hs | 10 ++++++++--
1 files changed, 8 insertions(+), 2 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 202ec897c93d8c40a2538c140ba66b1e4c06efaa
Author: Carl Howells <[email protected]>
Date: Thu Jul 1 16:56:14 2010 -0700
Document AppState in the hint template project better
diff --git a/project_template/hint/src/AppState.hs
b/project_template/hint/src/AppState.hs
index 09ec280..dd92d1f 100644
--- a/project_template/hint/src/AppState.hs
+++ b/project_template/hint/src/AppState.hs
@@ -7,8 +7,8 @@ module AppState (
, cleanupAppState
, StateSnap
, runStateSnap
- , ask
- , asks
+ , ask -- these functions are re-exported
+ , asks -- from Control.Monad.Reader
)
where
@@ -32,6 +32,10 @@ data AppState = AppState {
}
+-- An example of creating an application-specific MonadSnap instance.
+-- This instance uses the GeneralizedNewtypeDeriving extension to
+-- derive all the necessary instances from the underlying
+-- representation.
newtype StateSnap a = AS (ReaderT AppState Snap a)
deriving ( Monad
, MonadReader AppState
@@ -45,6 +49,8 @@ newtype StateSnap a = AS (ReaderT AppState Snap a)
)
+-- Convert the application-specific MonadSnap instance into a Snap
+-- type.
runStateSnap :: StateSnap a -> AppState -> Snap a
runStateSnap (AS rt) st = runReaderT rt st
-----------------------------------------------------------------------
hooks/post-receive
--
snap
_______________________________________________
Snap mailing list
[email protected]
http://mailman-mail5.webfaction.com/listinfo/snap