# HG changeset patch # User unc0rr # Date 1252047867 0 # Node ID b39d826e1ccd4dbd940c9364616da2d7b5404840 # Parent 3c25c1f6180ed707a8c476a6fdddfdbff2a45474 Drop support for ghc 6.8, use 6.10 instead 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 diff -r 3c25c1f6180e -r b39d826e1ccd gameServer/NetRoutines.hs --- 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 diff -r 3c25c1f6180e -r b39d826e1ccd gameServer/OfficialServer/extdbinterface.hs --- 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) diff -r 3c25c1f6180e -r b39d826e1ccd gameServer/hedgewars-server.hs --- 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