diff -r 3c25c1f6180e -r b39d826e1ccd gameServer/ClientIO.hs --- a/gameServer/ClientIO.hs Thu Sep 03 10:02:50 2009 +0000 +++ b/gameServer/ClientIO.hs Fri Sep 04 07:04:27 2009 +0000 @@ -1,11 +1,7 @@ -{-# LANGUAGE CPP, PatternSignatures #-} +{-# LANGUAGE ScopedTypeVariables #-} module ClientIO where -#if defined(NEW_EXCEPTIONS) -import qualified Control.OldException as Exception -#else import qualified Control.Exception as Exception -#endif import Control.Concurrent.Chan import Control.Monad import System.IO @@ -34,14 +30,14 @@ clientSendLoop handle coreChan chan clientID = do answer <- readChan chan doClose <- Exception.handle - (\(e :: Exception.Exception) -> if isQuit answer then return True else sendQuit e >> return False) $ do + (\(e :: Exception.IOException) -> if isQuit answer then return True else sendQuit e >> return False) $ do forM_ answer (\str -> hPutStrLn handle str) hPutStrLn handle "" hFlush handle return $ isQuit answer if doClose then - Exception.handle (\(_ :: Exception.Exception) -> putStrLn "error on hClose") $ hClose handle + Exception.handle (\(_ :: Exception.IOException) -> putStrLn "error on hClose") $ hClose handle else clientSendLoop handle coreChan chan clientID