git.iko.soy/distributed-process
on master help sign in
Unique fields
commit225496f4c26cafdbcf1d19acf3da1b6cbc826eb0 authorEdsko de Vries <edsko@edsko.net> dateMon 17 Sep 2012, 10:31 (14 years ago) parent1ab2f85
1 file changed+23−23
network-transport-tcp/src/Network/Transport/TCP.hs+23−23
network-transport-tcp/src/Network/Transport/TCP.hs+23−23
@@ -231,34 +231,34 @@ import Data.Foldable (forM_, mapM_)
231231-- ValidRemoteEndPointState).
232232
233233data TCPTransport = TCPTransport
234− { transportHost :: N.HostName
235− , transportPort :: N.ServiceName
236− , transportState :: MVar TransportState
237− , transportParams :: TCPParameters
234+ { transportHost :: !N.HostName
235+ , transportPort :: !N.ServiceName
236+ , transportState :: !(MVar TransportState)
237+ , transportParams :: !TCPParameters
238238 }
239239
240240data TransportState =
241− TransportValid ValidTransportState
241+ TransportValid !ValidTransportState
242242 | TransportClosed
243243
244244data ValidTransportState = ValidTransportState
245− { _localEndPoints :: Map EndPointAddress LocalEndPoint
246− , _nextEndPointId :: EndPointId
245+ { _localEndPoints :: !(Map EndPointAddress LocalEndPoint)
246+ , _nextEndPointId :: !EndPointId
247247 }
248248
249249data LocalEndPoint = LocalEndPoint
250− { localAddress :: EndPointAddress
251− , localChannel :: Chan Event
252− , localState :: MVar LocalEndPointState
250+ { localAddress :: !EndPointAddress
251+ , localChannel :: !(Chan Event)
252+ , localState :: !(MVar LocalEndPointState)
253253 }
254254
255255data LocalEndPointState =
256− LocalEndPointValid ValidLocalEndPointState
256+ LocalEndPointValid !ValidLocalEndPointState
257257 | LocalEndPointClosed
258258
259259data ValidLocalEndPointState = ValidLocalEndPointState
260260 { _nextConnectionId :: !ConnectionId
261− , _localConnections :: Map EndPointAddress RemoteEndPoint
261+ , _localConnections :: !(Map EndPointAddress RemoteEndPoint)
262262 , _nextRemoteId :: !Int
263263 }
264264
@@ -345,9 +345,9 @@ data ValidLocalEndPointState = ValidLocalEndPointState
345345-- modifyRemoteState.
346346
347347data RemoteEndPoint = RemoteEndPoint
348− { remoteAddress :: EndPointAddress
349− , remoteState :: MVar RemoteState
350− , remoteId :: Int
348+ { remoteAddress :: !EndPointAddress
349+ , remoteState :: !(MVar RemoteState)
350+ , remoteId :: !Int
351351 }
352352
353353data RequestedBy = RequestedByUs | RequestedByThem
@@ -355,25 +355,25 @@ data RequestedBy = RequestedByUs | RequestedByThem
355355
356356data RemoteState =
357357 -- | Invalid remote endpoint (for example, invalid address)
358− RemoteEndPointInvalid (TransportError ConnectErrorCode)
358+ RemoteEndPointInvalid !(TransportError ConnectErrorCode)
359359 -- | The remote endpoint is being initialized
360− | RemoteEndPointInit (MVar ()) RequestedBy
360+ | RemoteEndPointInit !(MVar ()) !RequestedBy
361361 -- | "Normal" working endpoint
362− | RemoteEndPointValid ValidRemoteEndPointState
362+ | RemoteEndPointValid !ValidRemoteEndPointState
363363 -- | The remote endpoint is being closed (garbage collected)
364− | RemoteEndPointClosing (MVar ()) ValidRemoteEndPointState
364+ | RemoteEndPointClosing !(MVar ()) !ValidRemoteEndPointState
365365 -- | The remote endpoint has been closed (garbage collected)
366366 | RemoteEndPointClosed
367367 -- | The remote endpoint has failed, or has been forcefully shutdown
368368 -- using a closeTransport or closeEndPoint API call
369− | RemoteEndPointFailed IOException
369+ | RemoteEndPointFailed !IOException
370370
371371data ValidRemoteEndPointState = ValidRemoteEndPointState
372372 { _remoteOutgoing :: !Int
373− , _remoteIncoming :: IntSet
374− , remoteSocket :: N.Socket
373+ , _remoteIncoming :: !IntSet
374+ , remoteSocket :: !N.Socket
375375 , sendOn :: [ByteString] -> IO ()
376− , _pendingCtrlRequests :: IntMap (MVar (Either IOException [ByteString]))
376+ , _pendingCtrlRequests :: !(IntMap (MVar (Either IOException [ByteString])))
377377 , _nextCtrlRequestId :: !ControlRequestId
378378 }
379379