equal
deleted
inserted
replaced
2 ( |
2 ( |
3 module RoomsAndClients, |
3 module RoomsAndClients, |
4 clientRoomA, |
4 clientRoomA, |
5 ServerState(..), |
5 ServerState(..), |
6 client's, |
6 client's, |
7 allClientsS |
7 allClientsS, |
|
8 roomClientsS |
8 ) where |
9 ) where |
9 |
10 |
10 import Control.Monad.State |
11 import Control.Monad.State |
11 ---------------------- |
12 ---------------------- |
12 import RoomsAndClients |
13 import RoomsAndClients |
31 rnc <- gets roomsClients |
32 rnc <- gets roomsClients |
32 liftIO $ client'sM rnc f ci |
33 liftIO $ client'sM rnc f ci |
33 |
34 |
34 allClientsS :: StateT ServerState IO [ClientInfo] |
35 allClientsS :: StateT ServerState IO [ClientInfo] |
35 allClientsS = gets roomsClients >>= liftIO . clientsM |
36 allClientsS = gets roomsClients >>= liftIO . clientsM |
|
37 |
|
38 roomClientsS :: RoomIndex -> StateT ServerState IO [ClientInfo] |
|
39 roomClientsS ri = do |
|
40 rnc <- gets roomsClients |
|
41 liftIO $ roomClientsM rnc ri |
|
42 |