gameServer/ServerState.hs
changeset 4975 31da8979e5b1
parent 4622 8bdc879ee6b2
child 4989 4771fed9272e
--- a/gameServer/ServerState.hs	Mon Feb 28 22:28:43 2011 +0300
+++ b/gameServer/ServerState.hs	Thu Mar 03 22:15:13 2011 +0300
@@ -15,33 +15,33 @@
 import RoomsAndClients
 import CoreTypes
 
-data ServerState = ServerState {
+data ServerState c = ServerState {
         clientIndex :: !(Maybe ClientIndex),
-        serverInfo :: !ServerInfo,
+        serverInfo :: !(ServerInfo c),
         removedClients :: !(Set.Set ClientIndex),
         roomsClients :: !MRnC
     }
 
 
-clientRoomA :: StateT ServerState IO RoomIndex
+clientRoomA :: StateT (ServerState c) IO RoomIndex
 clientRoomA = do
     (Just ci) <- gets clientIndex
     rnc <- gets roomsClients
     io $ clientRoomM rnc ci
 
-client's :: (ClientInfo -> a) -> StateT ServerState IO a
+client's :: (ClientInfo -> a) -> StateT (ServerState c) IO a
 client's f = do
     (Just ci) <- gets clientIndex
     rnc <- gets roomsClients
     io $ client'sM rnc f ci
 
-allClientsS :: StateT ServerState IO [ClientInfo]
+allClientsS :: StateT (ServerState c) IO [ClientInfo]
 allClientsS = gets roomsClients >>= liftIO . clientsM
 
-roomClientsS :: RoomIndex -> StateT ServerState IO [ClientInfo]
+roomClientsS :: RoomIndex -> StateT (ServerState c) IO [ClientInfo]
 roomClientsS ri = do
     rnc <- gets roomsClients
     io $ roomClientsM rnc ri
 
-io :: IO a -> StateT ServerState IO a
+io :: IO a -> StateT (ServerState c) IO a
 io = liftIO