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-core".
The branch, master has been updated
via 098b424b4305cebc9671ef6495a2f6f3dc8fff6c (commit)
from 46ec8ee04c81d11eada727398d65de2ee6af3f25 (commit)
Summary of changes:
src/Snap/Internal/Types.hs | 8 ++++----
test/suite/Snap/Internal/Routing/Tests.hs | 2 +-
test/suite/Snap/Types/Tests.hs | 8 ++++----
test/suite/Snap/Util/FileServe/Tests.hs | 4 ++--
test/suite/Snap/Util/GZip/Tests.hs | 6 +++---
5 files changed, 14 insertions(+), 14 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 098b424b4305cebc9671ef6495a2f6f3dc8fff6c
Author: Gregory Collins <[email protected]>
Date: Sun May 23 18:20:19 2010 -0400
Reorder runSnap/etc to put the Request last
diff --git a/src/Snap/Internal/Types.hs b/src/Snap/Internal/Types.hs
index ed2509e..31a173e 100644
--- a/src/Snap/Internal/Types.hs
+++ b/src/Snap/Internal/Types.hs
@@ -466,10 +466,10 @@ instance Exception NoHandlerException
------------------------------------------------------------------------------
-- | Runs a 'Snap' monad action in the 'Iteratee IO' monad.
runSnap :: Snap a
- -> Request
-> (ByteString -> IO ())
+ -> Request
-> Iteratee IO (Request,Response)
-runSnap (Snap m) req logerr = do
+runSnap (Snap m) logerr req = do
(r, ss') <- runStateT m ss
e <- maybe (return $ Left fourohfour)
@@ -497,10 +497,10 @@ runSnap (Snap m) req logerr = do
------------------------------------------------------------------------------
evalSnap :: Snap a
- -> Request
-> (ByteString -> IO ())
+ -> Request
-> Iteratee IO a
-evalSnap (Snap m) req logerr = do
+evalSnap (Snap m) logerr req = do
(r, _) <- runStateT m ss
e <- maybe (liftIO $ throwIO NoHandlerException)
diff --git a/test/suite/Snap/Internal/Routing/Tests.hs
b/test/suite/Snap/Internal/Routing/Tests.hs
index a3d1b64..d2b7a66 100644
--- a/test/suite/Snap/Internal/Routing/Tests.hs
+++ b/test/suite/Snap/Internal/Routing/Tests.hs
@@ -69,7 +69,7 @@ mkRequest uri = do
go :: Snap a -> ByteString -> IO a
go m s = do
req <- mkRequest s
- run $ evalSnap m req (const $ return ())
+ run $ evalSnap m (const $ return ()) req
routes :: Snap ByteString
diff --git a/test/suite/Snap/Types/Tests.hs b/test/suite/Snap/Types/Tests.hs
index c04405a..d6e8c8c 100644
--- a/test/suite/Snap/Types/Tests.hs
+++ b/test/suite/Snap/Types/Tests.hs
@@ -91,13 +91,13 @@ mkRqWithBody = do
go :: Snap a -> IO (Request,Response)
go m = do
zomgRq <- mkZomgRq
- run $ runSnap m zomgRq (const $ return ())
+ run $ runSnap m (const $ return ()) zomgRq
goPath :: ByteString -> Snap a -> IO (Request,Response)
goPath s m = do
rq <- mkRequest s
- run $ runSnap m rq (const $ return ())
+ run $ runSnap m (const $ return ()) rq
goPathQuery :: ByteString
@@ -107,13 +107,13 @@ goPathQuery :: ByteString
-> IO (Request,Response)
goPathQuery s k v m = do
rq <- mkRequestQuery s k v
- run $ runSnap m rq (const $ return ())
+ run $ runSnap m (const $ return ()) rq
goBody :: Snap a -> IO (Request,Response)
goBody m = do
rq <- mkRqWithBody
- run $ runSnap m rq (const $ return ())
+ run $ runSnap m (const $ return ()) rq
testFail :: Test
diff --git a/test/suite/Snap/Util/FileServe/Tests.hs
b/test/suite/Snap/Util/FileServe/Tests.hs
index c3efebf..94eb756 100644
--- a/test/suite/Snap/Util/FileServe/Tests.hs
+++ b/test/suite/Snap/Util/FileServe/Tests.hs
@@ -39,13 +39,13 @@ getBody r = liftM fromWrap ((rspBodyToEnum $ rspBody r)
stream2stream >>= run)
go :: Snap a -> ByteString -> IO Response
go m s = do
rq <- mkRequest s
- liftM snd (run $ runSnap m rq (const $ return ()))
+ liftM snd (run $ runSnap m (const $ return ()) rq)
goIfModifiedSince :: Snap a -> ByteString -> ByteString -> IO Response
goIfModifiedSince m s lm = do
rq <- mkRequest s
let r = setHeader "if-modified-since" lm rq
- liftM snd (run $ runSnap m r (const $ return ()))
+ liftM snd (run $ runSnap m (const $ return ()) r)
mkRequest :: ByteString -> IO Request
diff --git a/test/suite/Snap/Util/GZip/Tests.hs
b/test/suite/Snap/Util/GZip/Tests.hs
index b584b21..92e249d 100644
--- a/test/suite/Snap/Util/GZip/Tests.hs
+++ b/test/suite/Snap/Util/GZip/Tests.hs
@@ -87,15 +87,15 @@ mkBadRq = do
goGZip, goCompress, goBad :: Snap a -> IO (Request,Response)
goGZip m = do
gzipRq <- mkGzipRq
- run $ runSnap m gzipRq (const $ return ())
+ run $ runSnap m (const $ return ()) gzipRq
goCompress m = do
compressRq <- mkCompressRq
- run $ runSnap m compressRq (const $ return ())
+ run $ runSnap m (const $ return ()) compressRq
goBad m = do
badRq <- mkBadRq
- run $ runSnap m badRq (const $ return ())
+ run $ runSnap m (const $ return ()) badRq
------------------------------------------------------------------------------
textPlain :: L.ByteString -> Snap ()
-----------------------------------------------------------------------
hooks/post-receive
--
snap-core
_______________________________________________
Snap mailing list
[email protected]
http://mailman-mail5.webfaction.com/listinfo/snap