git.iko.soy/distributed-process
on master help sign in
strip whitespace
commit205b5ad287464657f6489b77795ffb54faf9f829 authorTim Watson <tim@rabbitmq.com> dateSat 26 Jan 2013, 16:37 (14 years ago) parent2cb516c
1 file changed+7−7
distributed-process/src/Control/Distributed/Process/Internal/Primitives.hs+7−7
distributed-process/src/Control/Distributed/Process/Internal/Primitives.hs+7−7
@@ -315,7 +315,7 @@ matchIf c p = Match $ MatchMsg $ \msg ->
315315 !decoded = decode (messageEncoding msg)
316316 _ -> Nothing
317317
318−-- | Represents a received message and provides two basic operations on it.
318+-- | Represents a received message and provides two basic operations on it.
319319data AbstractMessage = AbstractMessage {
320320 forward :: ProcessId -> Process () -- ^ forward the message to @ProcessId@
321321 , maybeHandleMessage :: forall a b. (Serializable a)
@@ -324,7 +324,7 @@ data AbstractMessage = AbstractMessage {
324324 the supplied expression, then the expression will be evaluated against
325325 it. If this runtime type checking fails, then @Nothing@ will be returned
326326 to indicate the fact. If the check succeeds and evaluation proceeds
327− however, the resulting value with be wrapped with @Just@.
327+ however, the resulting value with be wrapped with @Just@.
328328 -}
329329 }
330330
@@ -334,9 +334,9 @@ data AbstractMessage = AbstractMessage {
334334-- type. If /not/ of the right type, then the 'AbstractMessage'
335335-- @maybeHandleMessage@ function will not evaluate the supplied expression,
336336-- /but/ the message will still have been removed from the process mailbox!
337−--
337+--
338338matchAny :: forall b. (AbstractMessage -> Process b) -> Match b
339−matchAny p = Match $ MatchMsg $ Just . p . abstract
339+matchAny p = Match $ MatchMsg $ Just . p . abstract
340340
341341-- | Match against an arbitrary message. 'matchAnyIf' will /only/ remove the
342342-- message from the process mailbox, /if/ the supplied condition matches. The
@@ -358,7 +358,7 @@ matchAnyIf c p = Match $ MatchMsg $ \msg ->
358358 -- Make sure the value is fully decoded so that we don't hang to
359359 -- bytestrings when the calling process doesn't evaluate immediately
360360 !decoded = decode (messageEncoding msg)
361− _ -> Nothing
361+ _ -> Nothing
362362
363363abstract :: Message -> AbstractMessage
364364abstract msg = AbstractMessage {
@@ -429,7 +429,7 @@ exit them reason = sendCtrlMsg Nothing (Exit them (createMessage reason))
429429-- the exception will be re-thrown.
430430--
431431-- To handle 'ProcessExitException' without regard for /reason/, see 'catch'.
432−-- To handle multiple /reasons/ of differing types, see 'catchesExit'.
432+-- To handle multiple /reasons/ of differing types, see 'catchesExit'.
433433catchExit :: forall a b . (Show a, Serializable a)
434434 => Process b
435435 -> (ProcessId -> a -> Process b)
@@ -454,7 +454,7 @@ catchExit act exitHandler = catch act handleExit
454454-- a handler passed to 'catchesExit' must accept 'AbstractMessage' and return
455455-- @Maybe@ (i.e., @Just p@ if it handled the exit reason, otherwise @Nothing@).
456456--
457−-- See 'maybeHandleMessage' and 'AsbtractMessage' for more details.
457+-- See 'maybeHandleMessage' and 'AsbtractMessage' for more details.
458458catchesExit :: Process b
459459 -> [(ProcessId -> AbstractMessage -> (Process (Maybe b)))]
460460 -> Process b