on master help sign in
Rename StreamingBody to Body
85d166aAndrew Pritchard
wai/Network/Wai/HTTP2.hs+3−3
@@ -20,9 +20,9 @@ type Trailers = H.ResponseHeaders
20-- | The HTTP\/2-aware equivalent of 'Network.Wai.Application'.
20-- | The HTTP\/2-aware equivalent of 'Network.Wai.Application'.
21type Http2Application = Request -> (forall a. Response a -> IO a) -> IO Trailers
21type Http2Application = Request -> (forall a. Response a -> IO a) -> IO Trailers
22
22
23−type StreamingBody a = (Builder -> IO ()) -> IO () -> IO a
23+type Body a = (Builder -> IO ()) -> IO () -> IO a
24
24
25−type Response a = (H.Status, H.ResponseHeaders, StreamingBody a)
25+type Response a = (H.Status, H.ResponseHeaders, Body a)
26
26
27responseStatus :: Response a -> H.Status
27responseStatus :: Response a -> H.Status
28responseStatus (s, _, _) = s
28responseStatus (s, _, _) = s
@@ -30,5 +30,5 @@ responseStatus (s, _, _) = s
30responseHeaders :: Response a -> H.ResponseHeaders
30responseHeaders :: Response a -> H.ResponseHeaders
31responseHeaders (_, h, _) = h
31responseHeaders (_, h, _) = h
32
32
33−responseStream :: H.Status -> H.ResponseHeaders -> StreamingBody a -> Response a
33+responseStream :: H.Status -> H.ResponseHeaders -> Body a -> Response a
34responseStream = (,,)
34responseStream = (,,)
warp/Network/Wai/Handler/Warp/HTTP2/Worker.hs+1−1
@@ -85,7 +85,7 @@ worker ctx@Context{inputQ,outputQ} set tm app responder = do
85 where
85 where
86 go sinfo tcont th = do
86 go sinfo tcont th = do
87 setThreadContinue tcont True
87 setThreadContinue tcont True
88− -- Since 'StreamingBody' is loop, we cannot control it.
88+ -- Since 'Body' is loop, we cannot control it.
89 -- So, let's serialize 'Builder' with a designated queue.
89 -- So, let's serialize 'Builder' with a designated queue.
90 sq <- newTBQueueIO 10 -- fixme: hard coding: 10
90 sq <- newTBQueueIO 10 -- fixme: hard coding: 10
91 ex <- E.try $ do
91 ex <- E.try $ do