úÎ,ë*è     Noneb1  b2 has the  of b2 begin where the yield  occured in b1, i.e. b2'0s first input will be the final input handed to  b1.  !"  !"NoneOne can   a messages to a Mailbox where it will be processed  according to an actor' s defined   Sequence two Behaviors. After the first s the second takes over, @ discarding the message the former was processing. See also the #  instance for Behavior. # b <.|> b' = b `mappend` constB b' IImmediately give up processing an input, perhaps relinquishing the input  to an  Alternative# computation or exiting the actor.  yield = mzero AUseful to make defining a continuing Behavior more readable as a  " receive block", e.g.   pairUp out = Receive $ do  a <- received  receive $ do  b <- received  send out (b,a)  return (pairUp out)  Defined as:  receive = return . Receive *Return the message received to start this  block. N.B the value 9 returned here does not change between calls in the same .  received = ask Return ' message matching predicate, otherwise . 8 guardReceived p = ask >>= \i-> guard (p i) >> return i JSend a message asynchronously. This can be used to send messages to other  Actors via a 5, or used as a means of output from the Actor system * to IO since the function is polymorphic.  send b = liftIO . writeChan b Like = but allows one to specify explicitly the channel from which J an actor should take its input. Useful for extending the library to work  over other channels. Run a  Behavior ()4 in the main thread, returning when the computation  exits. run a  in the IO monad, taking its "messages" from the list. 'Fork an actor performing the specified . N.B. an actor  begins execution of its  headBehavior only after a mesage has been  received. See also . CFork a looping computation which starts immediately. Equivalent to  launching a  Behavior () and another " that sends an infinite stream of  ()s to the former's . >Prints all messages to STDOUT in the order they are received,  -ing  immediately after n inputs are printed. Like  but using putStr. Sends a ()) to the passed chan. This is useful with $ for " signalling the end of some other . * signalB c = Receive (send c () >> yield) A Behavior= that discard its first input, returning the passed Behavior / for processing subsequent inputs. Useful with  Alternative or # 4 compositions when one wants to ignore the leftover  ed message.  constB = Receive . return  %&      %&'      !"#$%&'(')*+,simple-actors-0.2.0Control.Concurrent.Actors"Control.Concurrent.Actors.BehaviorActionBehaviorReceive headActionMailbox<.|>yieldreceivereceived guardReceivedsend spawnReading runBehavior_ runBehaviorspawnspawn_printBputStrBsignalBconstB$fMonoidBehaviorbase Control.MonadmplusreaderT runActionactionrunBehaviorStep$fArrowLoopAction$fArrowZeroAction$fArrowPlusAction$fArrowChoiceAction$fArrowApplyAction $fArrowAction$fCategoryAction$fContravariantBehavior Data.MonoidMonoidmappend$fNewSplitChanMailboxMessages$fSplitChanMailboxMessages