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 460e7cc7ee82ee3eaef23ddb7b7d2a8806af0ea9 (commit)
from 6fc82788e19892993bf08961ab3d0ce162ca9f60 (commit)
Summary of changes:
src/Snap/Loader/Static.hs | 21 ++++++++++++++++++---
1 files changed, 18 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 460e7cc7ee82ee3eaef23ddb7b7d2a8806af0ea9
Author: Carl Howells <[email protected]>
Date: Wed Jun 30 09:16:31 2010 -0700
Document Snap.Loader.Hint
diff --git a/src/Snap/Loader/Static.hs b/src/Snap/Loader/Static.hs
index 6a8ff90..0785c9e 100644
--- a/src/Snap/Loader/Static.hs
+++ b/src/Snap/Loader/Static.hs
@@ -1,13 +1,28 @@
{-# LANGUAGE TemplateHaskell #-}
-
+-- | This module is a source-compatible replacement for
+-- "Snap.Loader.Hint". It does not import the GHC api, directly or
+-- transitively, resulting in a greatly decreased binary size, as
+-- compared to the Hint loader.
+--
+-- This module results in the same code as using the actions in the
+-- obvious, straight-forward manner. It is present *only* as a
+-- source-level replacement for the Hint loader, to enable quickly
+-- switching the Hint loader off with only a changed import.
module Snap.Loader.Static where
-------------------------------------------------------------------------------
import Control.Arrow
import Language.Haskell.TH.Syntax
+
------------------------------------------------------------------------------
--- | XXX
+-- | This function is a shim for source compatibility with loadSnapTH
+-- in "Snap.Loader.Hint". This function is a TH wrapper around a
+-- hypothetical function:
+--
+-- > loadSnap :: IO a -> (a -> IO ()) -> (a -> Snap ()) -> IO (IO (), Snap ())
+-- > loadSnap initialize cleanup action = do
+-- > i <- initialize
+-- > return (cleanup i, action i)
loadSnapTH :: Name -> Name -> Name -> Q Exp
loadSnapTH initialize cleanup action = do
funE <- [| \c a -> fmap (c &&& a) |]
-----------------------------------------------------------------------
hooks/post-receive
--
snap
_______________________________________________
Snap mailing list
[email protected]
http://mailman-mail5.webfaction.com/listinfo/snap