git.iko.soy/distributed-process
on master help sign in
Cosmetic (ish) refactoring
commit8a3694cd50402f887f2035cf7ea2495a65164dfa authorTim Watson <watson.timothy@gmail.com> dateFri 29 Nov 2013, 15:48 (13 years ago) parent99f1e69
2 files changed+1−33
src/Control/Distributed/Process/Internal/Primitives.hs+1−1 src/Control/Distributed/Process/Management/Types.hs−32
src/Control/Distributed/Process/Internal/Primitives.hs+1−1
@@ -418,7 +418,7 @@ forward msg them = do
418418
419419-- | Wrap a 'Serializable' value in a 'Message'. Note that 'Message's are
420420-- 'Serializable' - like the datum they contain - but also note, deserialising
421−-- a 'Message' will yield a 'Message', not the type within it! To obtain the
421+-- such a 'Message' will yield a 'Message', not the type within it! To obtain the
422422-- wrapped datum, use 'unwrapMessage' or 'handleMessage' with a specific type.
423423--
424424-- @
src/Control/Distributed/Process/Management/Types.hs−32
@@ -75,38 +75,6 @@ data MxEvent =
7575
7676instance Binary MxEvent where
7777
78− -- put (MxSpawned pid) = putWord8 1 >> put pid
79− -- put (MxRegistered pid str) = putWord8 2 >> put pid >> put str
80− -- put (MxUnRegistered pid str) = putWord8 3 >> put pid >> put str
81− -- put (MxProcessDied pid res) = putWord8 4 >> put pid >> put res
82− -- put (MxNodeDied nid res) = putWord8 5 >> put nid >> put res
83− -- put (MxSent to fro msg) = putWord8 6 >> put to >> put fro >> put msg
84− -- put (MxReceived pid msg) = putWord8 7 >> put pid >> put msg
85− -- put (MxConnected cid epid) = putWord8 8 >> put cid >> put epid
86− -- put (MxDisconnected cid epid) = putWord8 9 >> put cid >> put epid
87− -- put (MxUser msg) = putWord8 10 >> put msg
88− -- put (MxLog msg) = putWord8 11 >> put msg
89− -- put (MxTraceTakeover pid) = putWord8 12 >> put pid
90− -- put MxTraceDisable = putWord8 13
91−
92− -- get = do
93− -- header <- getWord8
94− -- case header of
95− -- 1 -> MxSpawned <$> get
96− -- 2 -> MxRegistered <$> get <*> get
97− -- 3 -> MxUnRegistered <$> get <*> get
98− -- 4 -> MxProcessDied <$> get <*> get
99− -- 5 -> MxNodeDied <$> get <*> get
100− -- 6 -> MxSent <$> get <*> get <*> get
101− -- 7 -> MxReceived <$> get <*> get
102− -- 8 -> MxConnected <$> get <*> get
103− -- 9 -> MxDisconnected <$> get <*> get
104− -- 10 -> MxUser <$> get
105− -- 11 -> MxLog <$> get
106− -- 12 -> MxTraceTakeover <$> get
107− -- 13 -> return MxTraceDisable
108− -- _ -> error "MxEvent.get - invalid header"
109−
11078class Addressable a where
11179 resolveToPid :: a -> Maybe ProcessId
11280