@@ -135,7 +135,9 @@ instance Show LocalProcessId where
136-- | Process identifier
136-- | Process identifier
137data ProcessId = ProcessId
137data ProcessId = ProcessId
138+ { -- | The ID of the node the process is running on
138− { processNodeId :: NodeId
139+ processNodeId :: NodeId
140+ -- | Node-local identifier for the process
139 , processLocalId :: LocalProcessId
141 , processLocalId :: LocalProcessId
141 deriving (Eq, Ord, Typeable)
143 deriving (Eq, Ord, Typeable)
@@ -218,8 +220,14 @@ procMsg = Process . Trans.lift
219type LocalSendPortId = Int32
221type LocalSendPortId = Int32
223+-- | A send port is identified by a SendPortId.
225+-- You cannot send directly to a SendPortId; instead, use 'newChan'
226+-- to create a SendPort.
221data SendPortId = SendPortId {
227data SendPortId = SendPortId {
228+ -- | The ID of the process that will receive messages sent on this port
222 sendPortProcessId :: ProcessId
229 sendPortProcessId :: ProcessId
230+ -- | Process-local ID of the channel
223 , sendPortLocalId :: LocalSendPortId
231 , sendPortLocalId :: LocalSendPortId
225 deriving (Eq, Ord)
233 deriving (Eq, Ord)
@@ -231,7 +239,10 @@ instance Show SendPortId where
231data TypedChannel = forall a. Serializable a => TypedChannel (TChan a)
239data TypedChannel = forall a. Serializable a => TypedChannel (TChan a)
233-- | The send send of a typed channel (serializable)
241-- | The send send of a typed channel (serializable)
234−newtype SendPort a = SendPort { sendPortId :: SendPortId }
242+newtype SendPort a = SendPort {
243+ -- | The (unique) ID of this send port
244+ sendPortId :: SendPortId
235 deriving (Typeable, Binary, Show, Eq, Ord)
246 deriving (Typeable, Binary, Show, Eq, Ord)
237-- | The receive end of a typed channel (not serializable)
248-- | The receive end of a typed channel (not serializable)