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  596c514ccabe01e955806a232342aef3ac5d5daa (commit)
      from  05b453a22736ab4d79acbf09cbaac947c990c35a (commit)


Summary of changes:
 src/Snap/Internal/Types.hs     |    5 ++---
 test/suite/Snap/Types/Tests.hs |    3 ++-
 2 files changed, 4 insertions(+), 4 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 596c514ccabe01e955806a232342aef3ac5d5daa
Author: Gregory Collins <[email protected]>
Date:   Thu Sep 2 15:04:21 2010 -0400

    Tweak the return type of unsafeDetachRequestBody; old return type casts 
away the 'forall'

diff --git a/src/Snap/Internal/Types.hs b/src/Snap/Internal/Types.hs
index 2f5687c..89b9552 100644
--- a/src/Snap/Internal/Types.hs
+++ b/src/Snap/Internal/Types.hs
@@ -210,15 +210,14 @@ getRequestBody = liftM fromWrap $ runRequestBody 
stream2stream
 -- responsibility up to you. If you don't fully consume the
 -- 'Enumerator' you get here, the next HTTP request in the pipeline
 -- (if any) will misparse. Be careful with exception handlers.
-unsafeDetachRequestBody :: Snap (Enumerator a)
+unsafeDetachRequestBody :: Snap SomeEnumerator
 unsafeDetachRequestBody = do
     req <- getRequest
     let ioref = rqBody req
     senum <- liftIO $ readIORef ioref
-    let (SomeEnumerator enum) = senum
     liftIO $ writeIORef ioref
                (SomeEnumerator $ return . Iter.joinI . Iter.take 0)
-    return enum
+    return senum
 
 
 ------------------------------------------------------------------------------
diff --git a/test/suite/Snap/Types/Tests.hs b/test/suite/Snap/Types/Tests.hs
index c859688..c92b5cd 100644
--- a/test/suite/Snap/Types/Tests.hs
+++ b/test/suite/Snap/Types/Tests.hs
@@ -234,7 +234,8 @@ testRqBody = testCase "request bodies" $ do
         getRequestBody >>= liftIO . putMVar mvar2
 
     g mvar1 mvar2 = do
-        enum <- unsafeDetachRequestBody
+        senum <- unsafeDetachRequestBody
+        let (SomeEnumerator enum) = senum
         bs <- liftM fromWrap (liftIO $ enum stream2stream >>= run)
         liftIO $ putMVar mvar1 bs
         getRequestBody >>= liftIO . putMVar mvar2
-----------------------------------------------------------------------


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

Reply via email to