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 7e10297343f357e49265d286d13d38f21a1dc694 (commit)
from 9ee6142366e479a70c3909ac646287a5175eb964 (commit)
Summary of changes:
src/Snap/Extension.hs | 10 ++++++----
src/Snap/Extension/Loader/Devel.hs | 12 +++++-------
2 files changed, 11 insertions(+), 11 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 7e10297343f357e49265d286d13d38f21a1dc694
Author: Carl Howells <[email protected]>
Date: Thu Dec 23 10:08:21 2010 -0800
make getHintInternals pure
diff --git a/src/Snap/Extension.hs b/src/Snap/Extension.hs
index 262a5ad..d51776c 100644
--- a/src/Snap/Extension.hs
+++ b/src/Snap/Extension.hs
@@ -414,10 +414,12 @@ getHintInternals :: Initializer s
-- ^ The Initializer value
-> SnapExtend s ()
-- ^ An action in your application's monad.
- -> IO HintInternals
-getHintInternals i se = do
- (action, cleanup, _) <- runInitializer True i se
- return $ makeHintInternals (return ()) (const cleanup) (const action)
+ -> HintInternals
+getHintInternals i se = makeHintInternals runInit getCleanup getAction
+ where
+ runInit = runInitializer True i se
+ getAction (action, _, _) = action
+ getCleanup (_, cleanup, _) = cleanup
------------------------------------------------------------------------------
diff --git a/src/Snap/Extension/Loader/Devel.hs
b/src/Snap/Extension/Loader/Devel.hs
index 0299807..bf79506 100644
--- a/src/Snap/Extension/Loader/Devel.hs
+++ b/src/Snap/Extension/Loader/Devel.hs
@@ -9,8 +9,6 @@ module Snap.Extension.Loader.Devel
( loadSnapTH
) where
-import Control.Monad (join)
-
import Data.List (groupBy, intercalate, isPrefixOf, nub)
import Data.Maybe (catMaybes)
import Data.Time.Clock (diffUTCTime, getCurrentTime)
@@ -123,19 +121,19 @@ hintSnap opts modules initialization handler = do
]
interpreter = do
loadModules . nub $ modules
- let imports = "Prelude" : "Snap.Extension" :
+ let imports = "Snap.Extension" :
"Snap.Extension.Loader.Devel.Evaluator" :
modules
setImports . nub $ imports
- interpret action (as :: IO HintInternals)
+ interpret action (as :: HintInternals)
loadInterpreter = unsafeRunInterpreterWithArgs opts interpreter
- formatError (Left err) = error $ format err
- formatError (Right a) = a
+ formatOnError (Left err) = error $ format err
+ formatOnError (Right a) = a
- loader = join $ formatError `fmap` protectHandlers loadInterpreter
+ loader = formatOnError `fmap` protectHandlers loadInterpreter
test prevTime = do
now <- getCurrentTime
-----------------------------------------------------------------------
hooks/post-receive
--
snap
_______________________________________________
Snap mailing list
[email protected]
http://mailman-mail5.webfaction.com/listinfo/snap