diff -r 8c7da08df048 -r 170afc3ac39f gameServer/RoomsAndClients.hs --- a/gameServer/RoomsAndClients.hs Sun Jan 27 21:46:25 2013 +0400 +++ b/gameServer/RoomsAndClients.hs Mon Jan 28 00:50:00 2013 +0400 @@ -23,6 +23,7 @@ room'sM, allClientsM, clientsM, + roomsM, roomClientsM, roomClientsIndicesM, withRoomsAndClients, @@ -160,6 +161,9 @@ clientsM :: MRoomsAndClients r c -> IO [c] clientsM (MRoomsAndClients (_, clients)) = indicesM clients >>= mapM (liftM client' . readElem clients) +roomsM :: MRoomsAndClients r c -> IO [r] +roomsM (MRoomsAndClients (rooms, _)) = indicesM rooms >>= mapM (liftM room' . readElem rooms) + roomClientsIndicesM :: MRoomsAndClients r c -> RoomIndex -> IO [ClientIndex] roomClientsIndicesM (MRoomsAndClients (rooms, _)) (RoomIndex ri) = liftM roomClients' (rooms `readElem` ri)