git.iko.soy/distributed-process
on master help sign in
Improve documentation
commitaed9b8227f222520602c03f56e011775f2616532 authorEdsko de Vries <edsko@well-typed.com> dateFri 6 Jul 2012, 20:45 (14 years ago) parent8736f7d
2 files changed+15−5
distributed-process/distributed-process.cabal+2−3 distributed-process/src/Control/Distributed/Process/Internal/Types.hs+13−2
distributed-process/distributed-process.cabal+2−3
@@ -16,9 +16,8 @@ Description: This is an implementation of Cloud Haskell, as described in
1616 and Simon Peyton Jones
1717 (<http://research.microsoft.com/en-us/um/people/simonpj/papers/parallel/>),
1818 although some of the details are different. The precise message
19− passing semantics are based on /A unified semantics for future
20− Erlang/ by Hans Svensson, Lars-Åke Fredlund and Clara Benac
21− Earle.
19+ passing semantics are based on /A unified semantics for future Erlang/
20+ by Hans Svensson, Lars-Åke Fredlund and Clara Benac Earle.
2221
2322 You will probably also want to install a Cloud Haskell backend such
2423 as distributed-process-simplelocalnet.
distributed-process/src/Control/Distributed/Process/Internal/Types.hs+13−2
@@ -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)