diff --git a/warp/Network/Wai/Handler/Warp/FdCache.hs b/warp/Network/Wai/Handler/Warp/FdCache.hs index 1c5711edf..b521e19d8 100644 --- a/warp/Network/Wai/Handler/Warp/FdCache.hs +++ b/warp/Network/Wai/Handler/Warp/FdCache.hs @@ -114,7 +114,7 @@ getFd mfc path = look mfc path key >>= getFd' getFd' Nothing = do ent@(FdEntry _ fd mst) <- newFdEntry path update mfc (insert key ent) - return $ (fd, refresh mst) + return (fd, refresh mst) getFd' (Just (FdEntry _ fd mst)) = do refresh mst - return $ (fd, refresh mst) + return (fd, refresh mst) diff --git a/warp/Network/Wai/Handler/Warp/Response.hs b/warp/Network/Wai/Handler/Warp/Response.hs index 978bb1822..523d29428 100644 --- a/warp/Network/Wai/Handler/Warp/Response.hs +++ b/warp/Network/Wai/Handler/Warp/Response.hs @@ -1,6 +1,5 @@ {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} -{-# LANGUAGE BangPatterns #-} {-# LANGUAGE CPP #-} module Network.Wai.Handler.Warp.Response ( diff --git a/warp/Network/Wai/Handler/Warp/Run.hs b/warp/Network/Wai/Handler/Warp/Run.hs index 4fb0c56cc..0c4d7cfa2 100644 --- a/warp/Network/Wai/Handler/Warp/Run.hs +++ b/warp/Network/Wai/Handler/Warp/Run.hs @@ -1,6 +1,5 @@ {-# LANGUAGE CPP #-} {-# LANGUAGE ScopedTypeVariables #-} -{-# LANGUAGE CPP #-} module Network.Wai.Handler.Warp.Run where @@ -154,7 +153,7 @@ runSettingsConnection set getConn app = do restore $ serveConnection set cleaner port app conn addr cleanup cleanup = connClose conn >> T.cancel th >> onClose - handle onE $ (serve `onException` cleanup) + handle onE (serve `onException` cleanup) where -- FIXME: only IOEception is caught. What about other exceptions? getConnLoop = getConn `catch` \(e :: IOException) -> do diff --git a/warp/Network/Wai/Handler/Warp/Timeout.hs b/warp/Network/Wai/Handler/Warp/Timeout.hs index 46cc0c0b2..81e83e57f 100644 --- a/warp/Network/Wai/Handler/Warp/Timeout.hs +++ b/warp/Network/Wai/Handler/Warp/Timeout.hs @@ -14,8 +14,7 @@ module Network.Wai.Handler.Warp.Timeout ( import Control.Concurrent (forkIO, threadDelay, myThreadId, killThread) import qualified Control.Exception as E -import Control.Monad (forever) -import Control.Monad (void) +import Control.Monad (forever, void) import qualified Data.IORef as I import System.IO.Unsafe (unsafePerformIO)