--- 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
--- a/gameServer/NetRoutines.hs Thu Sep 03 10:02:50 2009 +0000
+++ b/gameServer/NetRoutines.hs Fri Sep 04 07:04:27 2009 +0000
@@ -1,4 +1,4 @@
-{-# LANGUAGE CPP, PatternSignatures #-}
+{-# LANGUAGE ScopedTypeVariables #-}
module NetRoutines where
import Network
@@ -7,11 +7,7 @@
import Control.Concurrent
import Control.Concurrent.Chan
import Control.Concurrent.STM
-#if defined(NEW_EXCEPTIONS)
-import qualified Control.OldException as Exception
-#else
import qualified Control.Exception as Exception
-#endif
import Data.Time
-----------------------------
import CoreTypes
@@ -21,7 +17,7 @@
acceptLoop :: Socket -> Chan CoreMessage -> Int -> IO ()
acceptLoop servSock coreChan clientCounter = do
Exception.handle
- (\(_ :: Exception.Exception) -> putStrLn "exception on connect") $
+ (\(_ :: Exception.IOException) -> putStrLn "exception on connect") $
do
(socket, sockAddr) <- Network.Socket.accept servSock
--- a/gameServer/OfficialServer/extdbinterface.hs Thu Sep 03 10:02:50 2009 +0000
+++ b/gameServer/OfficialServer/extdbinterface.hs Fri Sep 04 07:04:27 2009 +0000
@@ -1,3 +1,5 @@
+{-# LANGUAGE ScopedTypeVariables #-}
+
module Main where
import Prelude hiding (catch)
@@ -45,7 +47,7 @@
dbConnectionLoop mySQLConnectionInfo =
- Control.Exception.handle (\e -> return ()) $ handleSqlError $
+ Control.Exception.handle (\(_ :: IOException) -> return ()) $ handleSqlError $
bracket
(connectMySQL mySQLConnectionInfo)
(disconnect)
--- a/gameServer/hedgewars-server.hs Thu Sep 03 10:02:50 2009 +0000
+++ b/gameServer/hedgewars-server.hs Fri Sep 04 07:04:27 2009 +0000
@@ -1,4 +1,4 @@
-{-# LANGUAGE CPP, ScopedTypeVariables, PatternSignatures #-}
+{-# LANGUAGE CPP, ScopedTypeVariables #-}
module Main where