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  70438abc2a66da8d4f84395014b9482be8593942 (commit)
       via  245ffbf8866a0465a9fe81cadeb99e9d71bfc6b8 (commit)
      from  25639d50a6030d4b4cf1f3ee9dfd739c54d426b4 (commit)


Summary of changes:
 snap.cabal                       |    6 ++++--
 src/Snap/Extension/Heist/Impl.hs |   14 +++++---------
 src/Snap/Extension/Server.hs     |   20 +++++++++++---------
 3 files changed, 20 insertions(+), 20 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 70438abc2a66da8d4f84395014b9482be8593942
Merge: 245ffbf 25639d5
Author: Mighty Byte <[email protected]>
Date:   Thu Dec 9 11:10:36 2010 -0500

    Merge branch 'master' of git.snapframework.com:snap

diff --cc src/Snap/Extension/Heist/Impl.hs
index 7b3cf8c,7ef7115..8ad1d3f
--- a/src/Snap/Extension/Heist/Impl.hs
+++ b/src/Snap/Extension/Heist/Impl.hs
@@@ -51,10 -51,14 +51,11 @@@ module Snap.Extension.Heist.Imp
    , MonadHeist(..)
    , HasHeistState(..)
    , heistInitializer
+   , registerSplices
    ) where
  
 -import           Control.Applicative
  import           Control.Concurrent.MVar
 -import           Control.Monad
  import           Control.Monad.Reader
 -import           Control.Monad.Trans
  import qualified Data.ByteString as B
  import           Snap.Extension
  import           Snap.Extension.Heist
commit 245ffbf8866a0465a9fe81cadeb99e9d71bfc6b8
Author: Mighty Byte <[email protected]>
Date:   Thu Dec 9 11:10:21 2010 -0500

    Fix warnings.

diff --git a/snap.cabal b/snap.cabal
index 70509fb..f9daa2a 100644
--- a/snap.cabal
+++ b/snap.cabal
@@ -70,9 +70,10 @@ Library
 
   if impl(ghc >= 6.12.0)
     ghc-options: -Wall -fwarn-tabs -funbox-strict-fields -O2
-                 -fno-warn-unused-do-bind
+                 -fno-warn-orphans -fno-warn-unused-do-bind
   else
     ghc-options: -Wall -fwarn-tabs -funbox-strict-fields -O2
+                 -fno-warn-orphans
 
 Executable snap
   hs-source-dirs: src
@@ -108,9 +109,10 @@ Executable snap
 
   if impl(ghc >= 6.12.0)
     ghc-options: -Wall -fwarn-tabs -funbox-strict-fields -O2
-                 -fno-warn-unused-do-bind
+                 -fno-warn-orphans -fno-warn-unused-do-bind
   else
     ghc-options: -Wall -fwarn-tabs -funbox-strict-fields -O2
+                 -fno-warn-orphans
 
 source-repository head
   type:     git
diff --git a/src/Snap/Extension/Heist/Impl.hs b/src/Snap/Extension/Heist/Impl.hs
index 350c138..7b3cf8c 100644
--- a/src/Snap/Extension/Heist/Impl.hs
+++ b/src/Snap/Extension/Heist/Impl.hs
@@ -53,11 +53,8 @@ module Snap.Extension.Heist.Impl
   , heistInitializer
   ) where
 
-import           Control.Applicative
 import           Control.Concurrent.MVar
-import           Control.Monad
 import           Control.Monad.Reader
-import           Control.Monad.Trans
 import qualified Data.ByteString as B
 import           Snap.Extension
 import           Snap.Extension.Heist
@@ -115,12 +112,12 @@ class MonadSnap m => HasHeistState m s | s -> m where
 -- | The 'Initializer' for 'HeistState'. It takes one argument, a path to a
 -- template directory containing @.tpl@ files.
 heistInitializer :: MonadSnap m => FilePath -> Initializer (HeistState m)
-heistInitializer path = do
+heistInitializer p = do
     heistState <- liftIO $ do
         (origTs,sts) <- bindStaticTag emptyTemplateState
-        loadTemplates path origTs >>= either error (\ts -> do
+        loadTemplates p origTs >>= either error (\ts -> do
             tsMVar <- newMVar ts
-            return $ HeistState path origTs tsMVar sts id)
+            return $ HeistState p origTs tsMVar sts id)
     mkInitializer heistState
 
 
@@ -128,10 +125,10 @@ heistInitializer path = do
 instance MonadSnap m => InitializerState (HeistState m) where
     extensionId = const "Heist/Impl"
     mkCleanup   = const $ return ()
-    mkReload (HeistState path origTs tsMVar sts _) = do
+    mkReload (HeistState p origTs tsMVar sts _) = do
         clearStaticTagCache $ sts
         either error (modifyMVar_ tsMVar . const . return) =<<
-            loadTemplates path origTs
+            loadTemplates p origTs
 
 
 ------------------------------------------------------------------------------
@@ -153,7 +150,6 @@ instance HasHeistState m s => MonadHeist m (ReaderT s m) 
where
     render t     = ReaderT $ \s -> do
         let (HeistState _ _ tsMVar _ modifier) = getHeistState s
         ts <- liftIO $ fmap modifier $ readMVar tsMVar
-        mt <- renderTemplate ts t
         renderTemplate ts t >>= maybe pass (\html -> do
             modifyResponse $ setContentType "text/html; charset=utf-8"
             modifyResponse $ setContentLength (fromIntegral $ B.length html)
diff --git a/src/Snap/Extension/Server.hs b/src/Snap/Extension/Server.hs
index c53ec85..42c865e 100644
--- a/src/Snap/Extension/Server.hs
+++ b/src/Snap/Extension/Server.hs
@@ -29,8 +29,10 @@ module Snap.Extension.Server
   , module Snap.Http.Server.Config
   ) where
 
-import           Control.Applicative
+#ifndef HINT
 import           Control.Arrow
+#endif
+
 import           Control.Exception (SomeException)
 import           Control.Monad
 import           Control.Monad.CatchIO
@@ -44,7 +46,7 @@ import           Snap.Extension
 #ifdef HINT
 import           Snap.Loader.Hint
 #endif
-import           Snap.Http.Server (simpleHttpServe, setUnicodeLocale)
+import           Snap.Http.Server (simpleHttpServe)
 import qualified Snap.Http.Server.Config as C
 import           Snap.Http.Server.Config hiding ( defaultConfig
                                                 , completeConfig
@@ -120,13 +122,13 @@ httpServe :: ConfigExtend s
           -> SnapExtend s ()
           -- ^ The application to be served
           -> IO ()
-httpServe config init handler = do
-    (state, mkCleanup, mkSnap) <-
-        runInitializerHint verbose init (catch500 handler) reloader
+httpServe config i handler = do
+    (state, makeCleanup, mkSnap) <-
+        runInitializerHint verbose i (catch500 handler) reloader
 #ifdef HINT
-    (cleanup, snap) <- $(loadSnapTH 'state 'mkCleanup 'mkSnap)
+    (cleanup, snap) <- $(loadSnapTH 'state 'makeCleanup 'mkSnap)
 #else
-    (cleanup, snap) <- fmap (mkCleanup &&& mkSnap) state
+    (cleanup, snap) <- fmap (makeCleanup &&& mkSnap) state
 #endif
     let site = compress $ snap
     mapM_ printListen $ C.getListen config
@@ -136,8 +138,8 @@ httpServe config init handler = do
     output "Shutting down..."
 
   where
-    handle   :: SomeException -> IO ()
-    handle e = print e
+--    handle   :: SomeException -> IO ()
+--    handle e = print e
     conf     = completeConfig config
     verbose  = fromJust $ getVerbose conf
     output   = when verbose . hPutStrLn stderr
-----------------------------------------------------------------------


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

Reply via email to