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 09c6d4c1d3a6fd7a12a33b06712796b7fdc18222 (commit)
from ec1c7937a1394064c1b30532614ee60c8ccf2c2e (commit)
Summary of changes:
project_template/hint/src/Glue.hs | 25 -------------------------
project_template/hint/src/Site.hs | 2 +-
snap.cabal | 2 +-
3 files changed, 2 insertions(+), 27 deletions(-)
delete mode 100644 project_template/hint/src/Glue.hs
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 09c6d4c1d3a6fd7a12a33b06712796b7fdc18222
Author: Carl Howells <[email protected]>
Date: Fri Jun 25 12:49:03 2010 -0700
Move the code in the template Glue.hs to library Snap.Heist
diff --git a/project_template/hint/src/Glue.hs
b/project_template/hint/src/Glue.hs
deleted file mode 100644
index d7b6f7b..0000000
--- a/project_template/hint/src/Glue.hs
+++ /dev/null
@@ -1,25 +0,0 @@
-{-# LANGUAGE OverloadedStrings #-}
-module Glue where
-
-import qualified Data.ByteString.Char8 as S
-
-import Snap.Types
-import Text.Templating.Heist
-
-
-render :: TemplateState Snap -> S.ByteString -> Snap ()
-render ts template = do
- bytes <- renderTemplate ts template
- flip (maybe missingTemplate) bytes $ \x -> do
- modifyResponse $ setContentType "text/html; charset=utf-8"
- . setContentLength (fromIntegral $ S.length x)
- writeBS x
- where
- missingTemplate = do
- let msg = S.append "Unable to load template: " template
- modifyResponse $ setContentType "text/plain; charset=utf-8"
- . setContentLength (fromIntegral $ S.length msg)
- . setResponseStatus 500 "Internal Server Error"
- writeBS msg
-
-
diff --git a/project_template/hint/src/Site.hs
b/project_template/hint/src/Site.hs
index 056d9a6..e9a9e24 100644
--- a/project_template/hint/src/Site.hs
+++ b/project_template/hint/src/Site.hs
@@ -9,7 +9,7 @@ import Control.Monad.Trans (liftIO)
import qualified Data.ByteString.Char8 as S
import Data.Time.Clock
-import Glue
+import Snap.Heist
import Snap.Util.FileServe (fileServe)
import Snap.Types
diff --git a/snap.cabal b/snap.cabal
index c7cd015..3a092e5 100644
--- a/snap.cabal
+++ b/snap.cabal
@@ -36,7 +36,6 @@ extra-source-files:
project_template/hint/resources/static/screen.css,
project_template/hint/resources/templates/index.tpl,
project_template/hint/src/Config.hs,
- project_template/hint/src/Glue.hs,
project_template/hint/src/Main.hs,
project_template/hint/src/Server.hs,
project_template/hint/src/Site.hs
@@ -45,6 +44,7 @@ Library
hs-source-dirs: src
exposed-modules:
+ Snap.Heist,
Snap.Loader.Static,
Snap.Loader.Hint
-----------------------------------------------------------------------
hooks/post-receive
--
snap
_______________________________________________
Snap mailing list
[email protected]
http://mailman-mail5.webfaction.com/listinfo/snap