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  73dc9738d41c0d6a67e9c7418b795a78211e5f91 (commit)
      from  035f8513b18720cc672dd1337efa7d0ca854e3c6 (commit)


Summary of changes:
 project_template/hint/src/Config.hs |   12 ++++++++++++
 project_template/hint/src/Main.hs   |   11 ++++++++---
 2 files changed, 20 insertions(+), 3 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 73dc9738d41c0d6a67e9c7418b795a78211e5f91
Author: Carl Howells <[email protected]>
Date:   Wed Jun 30 16:47:55 2010 -0700

    More documentation

diff --git a/project_template/hint/src/Config.hs 
b/project_template/hint/src/Config.hs
index a4fed1b..ca6ed62 100644
--- a/project_template/hint/src/Config.hs
+++ b/project_template/hint/src/Config.hs
@@ -1,3 +1,4 @@
+-- This module contains site-specific configuration information.
 module Config where
 
 import Control.Applicative ((<$>))
@@ -5,11 +6,19 @@ import Data.Time.Clock
 import Snap.Types
 import Text.Templating.Heist
 
+
+-- This contains the site configuration.  Being a boring sample site,
+-- this is just a boring sample configuration.  It has the load time
+-- (to help illustrate config loading differences between development
+-- and production modes) and the TemplateState used for rendering
+-- Heist templates.
 data Config = Config {
       loadTime :: UTCTime
     , templateState :: TemplateState Snap
     }
 
+
+-- loads the heist TemplateState, and gets the current time.
 getConfig :: IO Config
 getConfig = do
     time <- getCurrentTime
@@ -17,5 +26,8 @@ getConfig = do
     either error (Config time) <$> ets
 
 
+-- Doesn't actually do anything.  This is a placeholder for tasks like
+-- releasing database connections, or cleaning up anything else that
+-- might have been included in the config.
 cleanupConfig :: Config -> IO ()
 cleanupConfig _ = return ()
diff --git a/project_template/hint/src/Main.hs 
b/project_template/hint/src/Main.hs
index 27502da..9627727 100644
--- a/project_template/hint/src/Main.hs
+++ b/project_template/hint/src/Main.hs
@@ -18,6 +18,11 @@ import Snap.Loader.Hint   (loadSnapTH)
 -- This is the entry point for this web server application.  It
 -- supports easily switching between interpreting source and running
 -- statically compiled code.
+--
+-- In either mode, the generated program should be run from the root
+-- of the project tree.  It locates its templates, static content, and
+-- source files in development mode, relative to the current working
+-- directory when it is run.
 main :: IO ()
 main = do
     -- override the some of the defaults from Snap.Http.Server.Config
@@ -46,9 +51,9 @@ main = do
     -- loaders are how the action is determined, and when the
     -- getConfig and cleanupConfig functions are killed.
     --
-    --  The Hint loader uses the ghc api to interpret the sources when
-    --  pages are loaded.  It also runs getConfig and cleanupConfig
-    --  for each request it handles.
+    -- The Hint loader uses the ghc api to interpret the sources when
+    -- pages are loaded.  It also runs getConfig and cleanupConfig for
+    -- each request it handles.
     --
     -- The Static loader compiles all the actions when the app is
     -- compiled.  It runs getConfig once, at the start of the program,
-----------------------------------------------------------------------


hooks/post-receive
-- 
snap
_______________________________________________
Snap mailing list
[email protected]
http://mailman-mail5.webfaction.com/listinfo/snap

Reply via email to