on master help sign in
cleanup according to hlint.
998d8ccKazu Yamamoto
warp/Network/Wai/Handler/Warp/FdCache.hs+2−2
@@ -114,7 +114,7 @@ getFd mfc path = look mfc path key >>= getFd'
114 getFd' Nothing = do
114 getFd' Nothing = do
115 ent@(FdEntry _ fd mst) <- newFdEntry path
115 ent@(FdEntry _ fd mst) <- newFdEntry path
116 update mfc (insert key ent)
116 update mfc (insert key ent)
117− return $ (fd, refresh mst)
117+ return (fd, refresh mst)
118 getFd' (Just (FdEntry _ fd mst)) = do
118 getFd' (Just (FdEntry _ fd mst)) = do
119 refresh mst
119 refresh mst
120− return $ (fd, refresh mst)
120+ return (fd, refresh mst)
warp/Network/Wai/Handler/Warp/Response.hs−1
@@ -1,6 +1,5 @@
1{-# LANGUAGE OverloadedStrings #-}
1{-# LANGUAGE OverloadedStrings #-}
2{-# LANGUAGE ScopedTypeVariables #-}
2{-# LANGUAGE ScopedTypeVariables #-}
3−{-# LANGUAGE BangPatterns #-}
4{-# LANGUAGE CPP #-}
3{-# LANGUAGE CPP #-}
5
4
6module Network.Wai.Handler.Warp.Response (
5module Network.Wai.Handler.Warp.Response (
warp/Network/Wai/Handler/Warp/Run.hs+1−2
@@ -1,6 +1,5 @@
1{-# LANGUAGE CPP #-}
1{-# LANGUAGE CPP #-}
2{-# LANGUAGE ScopedTypeVariables #-}
2{-# LANGUAGE ScopedTypeVariables #-}
3−{-# LANGUAGE CPP #-}
4
3
5module Network.Wai.Handler.Warp.Run where
4module Network.Wai.Handler.Warp.Run where
6
5
@@ -154,7 +153,7 @@ runSettingsConnection set getConn app = do
154 restore $ serveConnection set cleaner port app conn addr
153 restore $ serveConnection set cleaner port app conn addr
155 cleanup
154 cleanup
156 cleanup = connClose conn >> T.cancel th >> onClose
155 cleanup = connClose conn >> T.cancel th >> onClose
157− handle onE $ (serve `onException` cleanup)
156+ handle onE (serve `onException` cleanup)
158 where
157 where
159 -- FIXME: only IOEception is caught. What about other exceptions?
158 -- FIXME: only IOEception is caught. What about other exceptions?
160 getConnLoop = getConn `catch` \(e :: IOException) -> do
159 getConnLoop = getConn `catch` \(e :: IOException) -> do
warp/Network/Wai/Handler/Warp/Timeout.hs+1−2
@@ -14,8 +14,7 @@ module Network.Wai.Handler.Warp.Timeout (
14
14
15import Control.Concurrent (forkIO, threadDelay, myThreadId, killThread)
15import Control.Concurrent (forkIO, threadDelay, myThreadId, killThread)
16import qualified Control.Exception as E
16import qualified Control.Exception as E
17−import Control.Monad (forever)
17+import Control.Monad (forever, void)
18−import Control.Monad (void)
19import qualified Data.IORef as I
18import qualified Data.IORef as I
20import System.IO.Unsafe (unsafePerformIO)
19import System.IO.Unsafe (unsafePerformIO)
21
20