on master help sign in
Rename StreamingBody to Body
commit85d166a7731828a63638652f6261584a12f5dd60 authorAndrew Pritchard <awpr@google.com> dateThu 30 Jul 2015, 20:28 (11 years ago) parent37fdcf8
2 files changed+4−4
wai/Network/Wai/HTTP2.hs+3−3 warp/Network/Wai/Handler/Warp/HTTP2/Worker.hs+1−1
wai/Network/Wai/HTTP2.hs+3−3
@@ -20,9 +20,9 @@ type Trailers = H.ResponseHeaders
2020-- | The HTTP\/2-aware equivalent of 'Network.Wai.Application'.
2121type Http2Application = Request -> (forall a. Response a -> IO a) -> IO Trailers
2222
23−type StreamingBody a = (Builder -> IO ()) -> IO () -> IO a
23+type Body a = (Builder -> IO ()) -> IO () -> IO a
2424
25−type Response a = (H.Status, H.ResponseHeaders, StreamingBody a)
25+type Response a = (H.Status, H.ResponseHeaders, Body a)
2626
2727responseStatus :: Response a -> H.Status
2828responseStatus (s, _, _) = s
@@ -30,5 +30,5 @@ responseStatus (s, _, _) = s
3030responseHeaders :: Response a -> H.ResponseHeaders
3131responseHeaders (_, h, _) = h
3232
33−responseStream :: H.Status -> H.ResponseHeaders -> StreamingBody a -> Response a
33+responseStream :: H.Status -> H.ResponseHeaders -> Body a -> Response a
3434responseStream = (,,)
warp/Network/Wai/Handler/Warp/HTTP2/Worker.hs+1−1
@@ -85,7 +85,7 @@ worker ctx@Context{inputQ,outputQ} set tm app responder = do
8585 where
8686 go sinfo tcont th = do
8787 setThreadContinue tcont True
88− -- Since 'StreamingBody' is loop, we cannot control it.
88+ -- Since 'Body' is loop, we cannot control it.
8989 -- So, let's serialize 'Builder' with a designated queue.
9090 sq <- newTBQueueIO 10 -- fixme: hard coding: 10
9191 ex <- E.try $ do