@@ -7,8 +7,8 @@ module Network.Wai.HTTP2
7 , Responder
7 , Responder
9 , promiseHeaders
9 , promiseHeaders
10− , sendBuilder
10+ , writeBuilder
11− , sendFilePart
11+ , writeFilePart
14import Data.ByteString (ByteString)
14import Data.ByteString (ByteString)
@@ -38,15 +38,14 @@ type HTTP2Application = Request -> PushFunc -> Responder
38-- | Part of a streaming response -- either a 'Builder' or a range of a file.
38-- | Part of a streaming response -- either a 'Builder' or a range of a file.
39data Chunk = FileChunk FilePath (Maybe FilePart) | BuilderChunk Builder
39data Chunk = FileChunk FilePath (Maybe FilePart) | BuilderChunk Builder
42-- | Given the write function of a stream body, write the given 'Builder'.
41-- | Given the write function of a stream body, write the given 'Builder'.
43−sendBuilder :: (Chunk -> IO ()) -> Builder -> IO ()
42+writeBuilder :: (Chunk -> IO ()) -> Builder -> IO ()
44−sendBuilder = (. BuilderChunk)
43+writeBuilder = (. BuilderChunk)
46-- | Given the write function of a stream body, write part or all of the given
45-- | Given the write function of a stream body, write part or all of the given
48−sendFilePart :: (Chunk -> IO ()) -> FilePath -> Maybe FilePart -> IO ()
47+writeFilePart :: (Chunk -> IO ()) -> FilePath -> Maybe FilePart -> IO ()
49−sendFilePart = (.: FileChunk)
48+writeFilePart = (.: FileChunk)
50 where f .: g = curry $ f . uncurry g
49 where f .: g = curry $ f . uncurry g
52-- | The streaming body of a response. Equivalent to
51-- | The streaming body of a response. Equivalent to