@@ -22,29 +22,28 @@ import Data.Typeable
2222import qualified Network.HTTP.Types as H
2323import Network.HTTP2
2424import Network.HTTP2.Priority
25−import Network.Wai.HTTP2 (Http2Application, PushPromise, Responder, Response)
26−import Network.Wai hiding (Response, responseStatus)
25+import Network.Wai
2726import Network.Wai.Handler.Warp.HTTP2.EncodeFrame
2827import Network.Wai.Handler.Warp.HTTP2.Manager
2928import Network.Wai.Handler.Warp.HTTP2.Types
3029import Network.Wai.Handler.Warp.IORef
30+import Network.Wai.HTTP2 (Http2Application, PushPromise, Responder, RespondFunc)
3131import qualified Network.Wai.Handler.Warp.Settings as S
3232import qualified Network.Wai.Handler.Warp.Timeout as T
3333
3434----------------------------------------------------------------
3535
36−-- | An 'Http2Application' takes a @forall a. Response a -> IO a@; this type
37−-- implements that by currying some internal arguments.
36+-- | An 'Http2Application' takes a 'RespondFunc'; this type implements that by
37+-- currying some internal arguments.
3838--
3939-- This is the argument to a 'Responder'.
40−type Respond = IO () -> Stream -> TBQueue Sequence ->
41− (forall a. Response a -> IO a)
40+type Respond = IO () -> Stream -> TBQueue Sequence -> RespondFunc
4241
4342-- | This function is passed to workers.
44−-- They also pass 'Response's from 'Http2Application's to this function.
43+-- They also pass responses from 'Http2Application's to this function.
4544-- This function enqueues commands for the HTTP/2 sender.
4645response :: Context -> Manager -> ThreadContinue -> Respond
47−response ctx mgr tconf tickle strm sq rsp = do
46+response ctx mgr tconf tickle strm sq s h strmbdy = do
4847 -- TODO(awpr) HEAD requests will still stream.
4948
5049 -- We must not exit this WAI application.
@@ -56,12 +55,12 @@ response ctx mgr tconf tickle strm sq rsp = do
5655 -- After this work, this thread stops to decrease the number of workers.
5756 setThreadContinue tconf False
5857
59− runStream ctx OResponse tickle strm sq rsp
58+ runStream ctx OResponse tickle strm sq s h strmbdy
6059
6160runStream :: Context
6261 -> (Stream -> H.Status -> H.ResponseHeaders -> Aux -> Output)
6362 -> Respond
64−runStream Context{outputQ} mkOutput tickle strm sq (s, h, strmbdy) = do
63+runStream Context{outputQ} mkOutput tickle strm sq s h strmbdy = do
6564 tvar <- newTVarIO SyncNone
6665 let out = mkOutput strm s h (Persist sq tvar)
6766 -- Since we must not enqueue an empty queue to the priority