@@ -264,7 +264,7 @@ serveConnection settings th onException port app conn remoteHost' =
264264 where
265265 serveConnection' :: ResourceT IO ()
266266 serveConnection' = do
267− fromClient <- C.bufferSource $ C.Source $ return $ connSource conn th
267+ fromClient <- C.bufferSource $ connSource conn th
268268 serveConnection'' fromClient
269269
270270 serveConnection'' fromClient = do
@@ -335,7 +335,7 @@ parseRequest' port (firstLine:otherLines) remoteHost' src = do
335335 -- We can't use the standard isolate, as its counter is not
336336 -- kept in a mutable variable.
337337 lenRef <- liftIO $ I.newIORef len0
338− let isolate = C.Conduit $ return $ C.PreparedConduit push close
338+ let isolate = C.Conduit push close
339339 push bs = do
340340 len <- liftIO $ I.readIORef lenRef
341341 let (a, b) = S.splitAt len bs
@@ -343,10 +343,9 @@ parseRequest' port (firstLine:otherLines) remoteHost' src = do
343343 liftIO $ I.writeIORef lenRef len'
344344 return $ if len' == 0
345345 then C.Finished (if S.null b then Nothing else Just b) (if S.null a then [] else [a])
346− else C.Producing push close [a]
346+ else C.Producing isolate [a]
347347 close = return []
348− psrc <- C.prepareSource $ src C.$= isolate
349− return $ C.Source $ return psrc
348+ return $ src C.$= isolate
350349 return Request
351350 { requestMethod = method
352351 , httpVersion = httpversion
@@ -524,12 +523,13 @@ sendResponse th req conn r = sendResponse' r
524523 return $ isKeepAlive hs
525524 needsChunked' = needsChunked hs
526525 chunk :: C.Conduit Builder IO Builder
527− chunk = C.Conduit $ return C.PreparedConduit
526+ chunk = C.Conduit
528527 { C.conduitPush = push
529528 , C.conduitClose = close
530529 }
531530
532− push x = return $ C.Producing push close [chunkedTransferEncoding x]
531+ conduit = C.Conduit push close
532+ push x = return $ C.Producing conduit [chunkedTransferEncoding x]
533533 close = return [chunkedTransferTerminator]
534534
535535parseHeaderNoAttr :: ByteString -> H.Header
@@ -542,11 +542,11 @@ parseHeaderNoAttr s =
542542 else rest
543543 in (CI.mk k, rest')
544544
545−connSource :: Connection -> T.Handle -> C.PreparedSource IO ByteString
545+connSource :: Connection -> T.Handle -> C.Source IO ByteString
546546connSource Connection { connRecv = recv } th =
547547 src
548548 where
549− src = C.PreparedSource
549+ src = C.Source
550550 { C.sourcePull = do
551551 bs <- liftIO recv
552552 if S.null bs
@@ -560,7 +560,7 @@ connSource Connection { connRecv = recv } th =
560560-- | Use 'connSendAll' to send this data while respecting timeout rules.
561561connSink :: Connection -> T.Handle -> C.Sink B.ByteString IO ()
562562connSink Connection { connSendAll = send } th =
563− C.Sink $ return $ C.SinkData push close
563+ C.SinkData push close
564564 where
565565 close = liftIO (T.resume th)
566566 push x = do