git.iko.soy/distributed-process
on master help sign in
Unique fields
225496fEdsko de Vries
network-transport-tcp/src/Network/Transport/TCP.hs+23−23
@@ -231,34 +231,34 @@ import Data.Foldable (forM_, mapM_)
231-- ValidRemoteEndPointState).
231-- ValidRemoteEndPointState).
232
232
233data TCPTransport = TCPTransport
233data TCPTransport = TCPTransport
234− { transportHost :: N.HostName
234+ { transportHost :: !N.HostName
235− , transportPort :: N.ServiceName
235+ , transportPort :: !N.ServiceName
236− , transportState :: MVar TransportState
236+ , transportState :: !(MVar TransportState)
237− , transportParams :: TCPParameters
237+ , transportParams :: !TCPParameters
238 }
238 }
239
239
240data TransportState =
240data TransportState =
241− TransportValid ValidTransportState
241+ TransportValid !ValidTransportState
242 | TransportClosed
242 | TransportClosed
243
243
244data ValidTransportState = ValidTransportState
244data ValidTransportState = ValidTransportState
245− { _localEndPoints :: Map EndPointAddress LocalEndPoint
245+ { _localEndPoints :: !(Map EndPointAddress LocalEndPoint)
246− , _nextEndPointId :: EndPointId
246+ , _nextEndPointId :: !EndPointId
247 }
247 }
248
248
249data LocalEndPoint = LocalEndPoint
249data LocalEndPoint = LocalEndPoint
250− { localAddress :: EndPointAddress
250+ { localAddress :: !EndPointAddress
251− , localChannel :: Chan Event
251+ , localChannel :: !(Chan Event)
252− , localState :: MVar LocalEndPointState
252+ , localState :: !(MVar LocalEndPointState)
253 }
253 }
254
254
255data LocalEndPointState =
255data LocalEndPointState =
256− LocalEndPointValid ValidLocalEndPointState
256+ LocalEndPointValid !ValidLocalEndPointState
257 | LocalEndPointClosed
257 | LocalEndPointClosed
258
258
259data ValidLocalEndPointState = ValidLocalEndPointState
259data ValidLocalEndPointState = ValidLocalEndPointState
260 { _nextConnectionId :: !ConnectionId
260 { _nextConnectionId :: !ConnectionId
261− , _localConnections :: Map EndPointAddress RemoteEndPoint
261+ , _localConnections :: !(Map EndPointAddress RemoteEndPoint)
262 , _nextRemoteId :: !Int
262 , _nextRemoteId :: !Int
263 }
263 }
264
264
@@ -345,9 +345,9 @@ data ValidLocalEndPointState = ValidLocalEndPointState
345-- modifyRemoteState.
345-- modifyRemoteState.
346
346
347data RemoteEndPoint = RemoteEndPoint
347data RemoteEndPoint = RemoteEndPoint
348− { remoteAddress :: EndPointAddress
348+ { remoteAddress :: !EndPointAddress
349− , remoteState :: MVar RemoteState
349+ , remoteState :: !(MVar RemoteState)
350− , remoteId :: Int
350+ , remoteId :: !Int
351 }
351 }
352
352
353data RequestedBy = RequestedByUs | RequestedByThem
353data RequestedBy = RequestedByUs | RequestedByThem
@@ -355,25 +355,25 @@ data RequestedBy = RequestedByUs | RequestedByThem
355
355
356data RemoteState =
356data RemoteState =
357 -- | Invalid remote endpoint (for example, invalid address)
357 -- | Invalid remote endpoint (for example, invalid address)
358− RemoteEndPointInvalid (TransportError ConnectErrorCode)
358+ RemoteEndPointInvalid !(TransportError ConnectErrorCode)
359 -- | The remote endpoint is being initialized
359 -- | The remote endpoint is being initialized
360− | RemoteEndPointInit (MVar ()) RequestedBy
360+ | RemoteEndPointInit !(MVar ()) !RequestedBy
361 -- | "Normal" working endpoint
361 -- | "Normal" working endpoint
362− | RemoteEndPointValid ValidRemoteEndPointState
362+ | RemoteEndPointValid !ValidRemoteEndPointState
363 -- | The remote endpoint is being closed (garbage collected)
363 -- | The remote endpoint is being closed (garbage collected)
364− | RemoteEndPointClosing (MVar ()) ValidRemoteEndPointState
364+ | RemoteEndPointClosing !(MVar ()) !ValidRemoteEndPointState
365 -- | The remote endpoint has been closed (garbage collected)
365 -- | The remote endpoint has been closed (garbage collected)
366 | RemoteEndPointClosed
366 | RemoteEndPointClosed
367 -- | The remote endpoint has failed, or has been forcefully shutdown
367 -- | The remote endpoint has failed, or has been forcefully shutdown
368 -- using a closeTransport or closeEndPoint API call
368 -- using a closeTransport or closeEndPoint API call
369− | RemoteEndPointFailed IOException
369+ | RemoteEndPointFailed !IOException
370
370
371data ValidRemoteEndPointState = ValidRemoteEndPointState
371data ValidRemoteEndPointState = ValidRemoteEndPointState
372 { _remoteOutgoing :: !Int
372 { _remoteOutgoing :: !Int
373− , _remoteIncoming :: IntSet
373+ , _remoteIncoming :: !IntSet
374− , remoteSocket :: N.Socket
374+ , remoteSocket :: !N.Socket
375 , sendOn :: [ByteString] -> IO ()
375 , sendOn :: [ByteString] -> IO ()
376− , _pendingCtrlRequests :: IntMap (MVar (Either IOException [ByteString]))
376+ , _pendingCtrlRequests :: !(IntMap (MVar (Either IOException [ByteString])))
377 , _nextCtrlRequestId :: !ControlRequestId
377 , _nextCtrlRequestId :: !ControlRequestId
378 }
378 }
379
379