@@ -135,7 +135,9 @@ instance Show LocalProcessId where
135135
136136-- | Process identifier
137137data ProcessId = ProcessId
138− { processNodeId :: NodeId
138+ { -- | The ID of the node the process is running on
139+ processNodeId :: NodeId
140+ -- | Node-local identifier for the process
139141 , processLocalId :: LocalProcessId
140142 }
141143 deriving (Eq, Ord, Typeable)
@@ -218,8 +220,14 @@ procMsg = Process . Trans.lift
218220
219221type LocalSendPortId = Int32
220222
223+-- | A send port is identified by a SendPortId.
224+--
225+-- You cannot send directly to a SendPortId; instead, use 'newChan'
226+-- to create a SendPort.
221227data SendPortId = SendPortId {
228+ -- | The ID of the process that will receive messages sent on this port
222229 sendPortProcessId :: ProcessId
230+ -- | Process-local ID of the channel
223231 , sendPortLocalId :: LocalSendPortId
224232 }
225233 deriving (Eq, Ord)
@@ -231,7 +239,10 @@ instance Show SendPortId where
231239data TypedChannel = forall a. Serializable a => TypedChannel (TChan a)
232240
233241-- | 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
245+ }
235246 deriving (Typeable, Binary, Show, Eq, Ord)
236247
237248-- | The receive end of a typed channel (not serializable)