@@ -3,8 +3,6 @@ module Network.Wai.Handler.Warp.Conduit where
33import Control.Applicative
44import Control.Exception
55import Control.Monad (when, unless)
6−import Control.Monad.IO.Class (MonadIO, liftIO)
7−import Control.Monad.Trans.Class (lift)
86import Data.ByteString (ByteString)
97import Data.ByteString.Lazy.Char8 (pack)
108import qualified Data.ByteString as S
@@ -39,7 +37,7 @@ readISource (ISource src ref) = do
3937
4038 -- If no chunk available, then there aren't enough bytes in the
4139 -- stream. Throw a ConnectionClosedByPeer
42− when (S.null bs) $ liftIO $ throwIO ConnectionClosedByPeer
40+ when (S.null bs) $ throwIO ConnectionClosedByPeer
4341
4442 let -- How many of the bytes in this chunk to send downstream
4543 toSend = min count (S.length bs)
@@ -52,7 +50,7 @@ readISource (ISource src ref) = do
5250 -- downstream, and then loop on this function for the
5351 -- next chunk.
5452 | count' > 0 -> do
55− liftIO $ I.writeIORef ref count'
53+ I.writeIORef ref count'
5654 return bs
5755
5856 -- Some of the bytes in this chunk should not be sent