o      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnop q r s t u v w x y z { | } ~                                                                                                        !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~None%&09;+Objects that can be sent across the networkReification of . Reification of  (see #Control.Distributed.Process.Closure) *Encode type representation as a bytestring IDecode a bytestring into a fingerprint. Throws an IO exception on failure Size of a fingerprint.The fingerprint of the typeRep of the argument)Show fingerprint (for debugging purposes)           None0B< is an abstract type representing an unbounded FIFO channel.$Build and returns a new instance of IO version of *. This is useful for creating top-level s using , because using  inside  isn't possible.Write a value to a .Read the next value from the . A version of + which does not retry. Instead it returns Nothing if no value is available.Returns  if the supplied  is empty.  NoneB  !"#$%  !"#$%  !"#$%  !"#$%Safe& Strict list&'()*+,&(')*+,&'()*+,&'()*+,Safe-.-.-.-.None 2BMOT8Enqueue an elementEnqueue is strict.9,Variant of enqueue for use in the STM monad. @spanMatchMsg = first (map ((MatchMsg x) -> x)) . span isMatchMsg BspanMatchMsg = first (map ((MatchChan x) -> x)) . span isMatchChan:Dequeue an elementzThe timeout (if any) is applied only to waiting for incoming messages, not to checking messages that have already arrived;Weak reference to a CQueue/0123456789:QueueBlocking behaviourList of matches only on timeout;</0125346789:;<62345/01789:;< /0123456789:;<None%&05<=ADIORTK>$Signals to the node controller (see P)PMessages to the node controllerV+Provide information about a running processd(Asynchronous) reply from register and  unregisterf(Asynchronous) reply from whereish(Asynchronius) reply from spawnjj- are used to return pids of spawned processesl$(Asynchronous) reply from unlinkPortn$(Asynchronous) reply from unlinkNodep (Asynchronous) reply from unlinkr#(Asynchronous) reply from unmonitortWhy did a process die?uNormal terminationv3The process exited with an exception (provided as  because  does not implement )w)We got disconnected from the process nodexThe process node diedyInvalid (processnodechannel) identifierz(Internal exception thrown indirectly by exit|Exception thrown when a process attempts to register a process under an already-registered name or to unregister a name that hasn't been registered. Returns the name and the identifier of the process that owns it, if any.~2Exception thrown when a linked channel (port) dies(Exception thrown when a linked node dies,Exceptions thrown when a linked process dies'Message sent by channel (port) monitorsMessage sent by node monitors Message sent by process monitors8MonitorRef is opaque for regular Cloud Haskell processes ID of the entity to be monitoredCUnique to distinguish multiple monitor requests by the same process@Messages consist of their typeRep fingerprint and their encoding5The receive end of a typed channel (not serializable) Note that  implements , ,  and 7. This is especially useful when merging receive ports./The send send of a typed channel (serializable)!The (unique) ID of this send port*A send port is identified by a SendPortId.7You cannot send directly to a SendPortId; instead, use newChan to create a SendPort.BThe ID of the process that will receive messages sent on this portProcess-local ID of the channelThe Cloud Haskell  typeLocal process state#Processes running on our local nodeDThrown by some primitives when they notice the node has been closed.Processes running on this nodeCounter to assign PIDsThe uniqueP value used to create PIDs (so that processes on restarted nodes have new PIDs)Outgoing connectionsLocal node state Local nodes of the node.The network endpoint associated with this nodeLocal node stateChannel for the node controllerInternal management event busuRuntime lookup table for supporting closures TODO: this should be part of the CH state, not the local endpoint state'Local system management event bus state5Process id of the management agent controller process,Configuration for the local trace controller;Weak reference to the management agent controller's mailbox2API for adding management agents to a running node'Provides access to the trace controller1Process id for the currently active trace handler1Weak reference to the tracer controller's mailbox!Union of all kinds of identifiersProcess identifier,The ID of the node the process is running on%Node-local identifier for the processA local process ID consists of a seed which distinguishes processes from different instances of the same local node and a counterNode identifierWrapper around !< that checks that the local node is still in a valid state.Wrapper around #< that checks that the local node is still in a valid state.Wrapper around "< that checks that the local node is still in a valid state.Deconstructor for ! (not exported to the public API)internal use only.(Turn any serialiable term into a message:Turn any serializable term into an unencoded/local messagerTurn any serializable term into an unencodede/local message, without evalutaing it! This is a dangerous business.Serialize a messageDeserialize a message>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,>DCG?@ABEFHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstwuvxyz{|}~z{~|}tuvwxyrspqnolmjkhifgdeVWXYZ[\TU]^_`abcPQRS>?@ABCDEFGHIJKLMNOv>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+, Noneua u b is true if the death of a. (for instance, a node) implies the death of b' (for instance, a process on that node) pqrstuvNothing for the local nodeMessage to sendpqrstuvpqrstuv pqrstuv None05AITw(Type of a management agent's event sink.xGRepresents the actions a management agent can take when evaluating an  event sink.Monad for management agents.6A newtype wrapper for an agent id (which is a string).Gross though it is, this synonym represents a function used to forking new processes, which has to be passed as a HOF when calling mxAgentController, since there's no other way to avoid a circular dependency with Node.hs;The class of things that we might be able to resolve to a  ProcessId (or not). This is the default management event, fired for various internal events around the NT connection and Process lifecycle. All published events that conform to this type, are eligible for tracing - i.e., they will be delivered to the trace controller.)fired whenever a local process is spawned5fired whenever a process/name is registered (locally)7fired whenever a process/name is unregistered (locally)fired whenever a process diesfired whenever a node dies. (i.e., the connection is broken/disconnected)5fired whenever a message is sent from a local process7fired whenever a message is received by a local process>fired when a network-transport connection is first established@fired when a network-transport connection is broken/disconnecteda user defined trace eventa logging) event - used for debugging purposes onlyEnotifies a trace listener that all subsequent traces will be sent to pid;notifies a trace listener that it has been disabled/removed'wxyz{|}~%wxyz{|}~%xyz{|}~w wxyz{|}~  (c) Well-Typed / Tim WatsonBSD3 (see the file LICENSE)%Tim Watson <watson.timothy@gmail.com> experimental#non-portable (requires concurrency)None<Named send to a process in the local registry (asynchronous);Named send to a process in a remote registry (asynchronous)Send a messageSend a message unreliably.Unlike ", this function is insensitive to  reconnectg. It will try to send the message regardless of the history of connection failures between the nodes.Message passing with K is ordered for a given sender and receiver if the messages arrive at all.!Send a message on a typed channelCreate an unencoded Message for any  Serializable type. None None %&059;AT A generic ok% response from the trace coordinator.Defines what0 will be traced. Flags that control tracing of Process events, take a Q controlling which processes should generate trace events in the target process.2Defines which processes will be traced by a given  TraceFlag, either by name, or  ProcessId . Choosing TraceAll is by farw the most efficient approach, as the tracer process therefore avoids deciding whether or not a trace event is viable.+## None02AOT_You need this when using ( Thrown by  Opaque type used in  and Send a messageUnsafe variant of . This function makes no attempt to serialize and (in the case when the destination process resides on the same local node) therefore ensure that the payload is fully evaluated before it is delivered.Send a message unreliably.Unlike ", this function is insensitive to >g. It will try to send the message regardless of the history of connection failures between the nodes.Message passing with K is ordered for a given sender and receiver if the messages arrive at all.Unsafe variant of . This function makes no attempt to serialize the message when the destination process resides on the same local node. Therefore, a local receiver would need to be prepared to cope with any errors resulting from evaluation of the message.%Wait for a message of a specific typeCreate a new typed channel!Send a message on a typed channel7Send a message on a typed channel. This function makes no1 attempt to serialize and (in the case when the  ReceivePorto resides on the same local node) therefore ensure that the payload is fully evaluated before it is delivered.%Wait for a message on a typed channelLike Q but with a timeout. If the timeout is 0, do a non-blocking check for a message.Merge a list of typed channels.The result port is left-biased: if there are messages available on more than one port, the first available message is returned.Like =, but with a round-robin scheduler (rather than left-biased);Test the matches in order against each message in the queueLike  but with a timeout.If the timeout is zero do a non-blocking check for matching messages. A non-zero timeout is applied only when waiting for incoming messages (that is, after? we have checked the messages that are already in the mailbox).Match on a typed channel!Match on an arbitrary STM action.This rather unusaul match primitivep allows us to compose arbitrary STM actions with checks against our process' mailbox and/or any typed channel  ReceivePorts we may hold.1This allows us to process multiple input streams along with our mailbox, in just the same way that % supports checking both the mailbox and> an arbitrary set of typed channels in one atomic transaction.UNote there are no ordering guarnatees with respect to these disparate input sources.+Match against any message of the right typeFMatch against any message of the right type that satisfies a predicateHMatch against any message, regardless of the underlying (contained) typeTMatch against any message (regardless of underlying type) that satisfies a predicateForward a raw  to the given .Forward a raw  to the given .Unlike ", this function is insensitive to >g. It will try to send the message regardless of the history of connection failures between the nodes.Wrap a  value in a  . Note that s are F - like the datum they contain - but also note, deserialising such a  will yield a <, not the type within it! To obtain the wrapped datum, use  or  with a specific type. do self <- getSelfPid send self (wrapMessage "blah") Nothing <- expectTimeout 1000000 :: Process (Maybe String) (Just m) <- expectTimeout 1000000 :: Process (Maybe Message) (Just "blah") <- unwrapMessage m :: Process (Maybe String)  This is the unsafe variant of . See ,Control.Distributed.Process.UnsafePrimitives for details.Attempt to unwrap a raw j. If the type of the decoded message payload matches the expected type, the value will be returned with Just , otherwise Nothing# indicates the types do not match./This expression, for example, will evaluate to Nothing? > unwrapMessage (wrapMessage "foobar") :: Process (Maybe Int)$Whereas this expression, will yield  Just "foo"? > unwrapMessage (wrapMessage "foo") :: Process (Maybe String)Attempt to handle a raw . If the type of the message matches the type of the first argument to the supplied expression, then the message will be decoded and the expression evaluated against its value. If this runtime type checking fails however, Nothing will be returned to indicate the fact. If the check succeeds and evaluation proceeds, the resulting value with be wrapped with Just.Intended for use in  and  primitives.Conditionally handle a raw . If the predicate  (a -> Bool) evaluates to True/, invokes the supplied handler, other returns Nothing to indicate failure. See 6 for further information about runtime type checking.As ] but ignores result, which is useful if you don't care whether or not the handler succeeded.Conditional version of .$Match against an arbitrary message. T removes the first available message from the process mailbox. To handle arbitrary raw. messages once removed from the mailbox, see  and .:Match against an arbitrary message. Intended for use with  and , this function only. removes a message from the process mailbox, if^ the supplied condition matches. The success (or failure) of runtime type checks deferred to  handleMessageF and friends is irrelevant here, i.e., if the condition evaluates to TrueW then the message will be removed from the process mailbox and decoded, but that does not) guarantee that an expression passed to  handleMessage? will pass the runtime type checks and therefore be evaluated. !Remove any message from the queue 'Receives messages and forwards them to pid if  p msg == True. @A straight relay that forwards all messages to the supplied pid. Proxies pid and forwards messages whenever proc evaluates to True . Unlike   the predicate proc runs in the 1 monad, allowing for richer proxy behaviour. If proc returns False or the runtime type checkH fails, no action is taken and the proxy process will continue running. <Terminate immediately (throws a ProcessTerminationException)Die immediately - throws a z with the given reason.*Forceful request to kill a process. Where 8 provides an exception that can be caught and handled, R throws an unexposed exception type which cannot be handled explicitly (by type).+Graceful request to exit a process. Throws z with the supplied reason encoded as a message. Any  exit signal1 raised in this manner can be handled using the  family of functions.Catches zm. The handler will not be applied unless its type matches the encoded data stored in the exception (see the reason argument given to the P primitive). If the handler cannot be applied, the exception will be re-thrown. To handle z without regard for reason, see  . To handle multiple reasons of differing types, see .Lift  (almost).As z stores the exit reason as a typed, encoded message, a handler must accept inputs of the expected type. In order to handle a list of potentially different handlers (and therefore input types), a handler passed to  must accept  and return Maybe (i.e., Just p* if it handled the exit reason, otherwise Nothing).See maybeHandleMessage and  for more details.Our own process ID!Get the node ID of our local node'Get statistics about the specified node#Get statistics about our local node+Get information about the specified process'Link to a remote process (asynchronous)=When process A links to process B (that is, process A calls  link pidB) then an asynchronous exception will be thrown to process A when process B terminates (normally or abnormally), or when process A gets disconnected from process B. Although it is  technicallyu possible to catch these exceptions, chances are if you find yourself trying to do so you should probably be using  rather than . In particular, code such as mlink pidB -- Link to process B expect -- Wait for a message from process B unlink pidB -- Unlink againXdoesn't quite do what one might expect: if process B sends a message to process A, and subsequently terminatesz, then process A might or might not be terminated too, depending on whether the exception is thrown before or after the ( (i.e., this code has a race condition).SLinking is all-or-nothing: A is either linked to B, or it's not. A second call to  has no effect. Note that & provides unidirectional linking (see spawnSupervised`). Linking makes no distinction between normal and abnormal termination of the remote process.&Monitor another process (asynchronous)=When process A monitors process B (that is, process A calls  monitor pidB ) then process A will receive a  when process B terminates (normally or abnormally), or when process A gets disconnected from process B. You receive this message like any other (using '); the notification includes a reason (u, v, w, etc.).Every call to ! returns a new monitor reference ~; if multiple monitors are set up, multiple notifications will be delivered and monitors can be disabled individually using .4Establishes temporary monitoring of another process.withMonitor pid code sets up monitoring of pid for the duration of code7. Note: although monitoring is no longer active when  withMonitorI returns, there might still be unreceived monitor messages in the queue.4Establishes temporary monitoring of another process.withMonitor_ pid code sets up monitoring of pid for the duration of code6. Note: although monitoring is no longer active when  withMonitor_I returns, there might still be unreceived monitor messages in the queue. Since 0.6.1 Remove a linkThis is synchronous in the sense that once it returns you are guaranteed that no exception will be raised if the remote process dies. However, it is asynchronous in the sense that we do not wait for a response from the remote node.Remove a node link5This has the same synchronous/asynchronous nature as .!Remove a channel (send port) link5This has the same synchronous/asynchronous nature as .Remove a monitor5This has the same synchronous/asynchronous nature as .[ProcessMonitorNotification messages for the given MonitorRef are removed from the mailbox. Lift !Lift  "Lift !#Lift "$Lift #%Lift $&Lift %'Lift &(Lift )Like  but with a timeout*Asynchronous version of spawn(spawn is defined in terms of * and )+Monitor a node (asynchronous),&Monitor a typed channel (asynchronous)Remove a monitor (asynchronous)-Link to a node (asynchronous). Link to a channel (asynchronous)$Remove a process link (asynchronous)!Remove a node link (asynchronous)0Remove a channel (send port) link (asynchronous)/ Log a string say message sends a message of type  with the current time and 5 of the current process to the process registered as logger7. By default, this process simply sends the string to stderra. Individual Cloud Haskell backends might replace this with a different logger process, however.0Register a process with the local registry (synchronous). The name must not already be registered. The process need not be on this node. A bad registration will result in a |>The process to be registered does not have to be local itself.1Like 0R, but will replace an existing registration. The name must already be registered.29Register a process with a remote registry (asynchronous).mThe process to be registered does not have to live on the same remote node. Reply wil come in the form of a d messageSee comments in 74Remove a process from the local registry (asynchronous). This version will wait until a response is gotten from the management process. The name must already be registered.lDeal with the result from an attempted registration or unregistration by throwing an exception if necessary57Remove a process from a remote registry (asynchronous). Reply wil come in the form of a d messageSee comments in 76 Query the local process registry7.Query a remote process registry (asynchronous)!Reply will come in the form of a f message.-There is currently no synchronous version of 7: if you implement one yourself, be sure to take into account that the remote node might die or get disconnect before it can respond (i.e. you should use +1 and take appropriate action when you receive a ).8<Named send to a process in the local registry (asynchronous)9SNamed send to a process in the local registry (asynchronous). This function makes no attempt to serialize and (in the case when the destination process resides on the same local node) therefore ensure that the payload is fully evaluated before it is delivered.:;Named send to a process in a remote registry (asynchronous);QNamed send to a process in a remote registry (asynchronous) This function makes no attempt to serialize and (in the case when the destination process resides on the same local node) therefore ensure that the payload is fully evaluated before it is delivered.<Resolve a static value=Resolve a closure>Cloud Haskell provides the illusion of connection-less, reliable, ordered message passing. However, when network connections get disrupted this illusion cannot always be maintained. Once a network connection breaks (even temporarily) no further communication on that connection will be possible. For example, if process A sends a message to process B, and A is then notified (by monitor notification) that it got disconnected from B, A will not be able to send any further messages to B, unlesse A explicitly indicates that it is acceptable to attempt to reconnect to B using the Cloud Haskell > primitive.Importantly, when A calls > it acknowledges that some messages to B might have been lost. For instance, if A sends messages m1 and m2 to B, then receives a monitor notification that its connection to B has been lost, calls >M and then sends m3, it is possible that B will receive m1 and m3 but not m2. Note that > does not mean  reconnect now but rather /it is okay to attempt to reconnect on the next send/. In particular, if no further communication attempts are made to B then A can use reconnect to clean up its connection to B.?Reconnect to a sendport. See > for more information.Monitor a processnodechannelLink to a processnodechannelu      !"#$%&'()*+,-./0123456789:;<=>?@ABCqVWXYZ[\]^_`abczv      !"#$%&'()*+,-./0123456789:;<=>?q9;     zVWXYZ[\]^_`abc/014682357:=< (!"#$%&')*-.+,>?vm      !"#$%&'()*+,-./0123456789:;<=>?@ABCNoneOTFCP a b! is a process with input of type a and output of type bH8Static decoder, given a static serialization dictionary.See module documentation of #Control.Distributed.Process.Closure for an example.I!Serialization dictionary for '()'JSerialization dictionary for KSerialization dictionary for LSerialization dictionary for .MSerialization dictionary for .OF version of '(PF version of ()*)QF version of +,RF version of (+-)S(Not quite the) F version of (+.)UF version of VF version of WF version of XF version of YF version of ZF version of   delay them p9 is a process that waits for a signal (a message of type ()) from them/ (origin is not verified) before proceeding as p&. In order to avoid waiting forever,  delay them p monitors them<. If it receives a monitor message instead, it proceeds as p too.\F version of FGHIJKLMNOPQRSTUVWXYZ[\FGHIJKLMNOPQRSTUVWXYZ[\GHIJKLMNFOPQSRTUVZWXY\[FGHIJKLMNOPQRSTUVWXYZ[\None]VCreate the closure, decoder, and metadata definitions for the given list of functions^Like ]a, but parameterized by the declaration of a function instead of the function name. So where for ] you'd do %f :: T1 -> T2 f = ... remotable ['f]with ^ you would instead do @remotableDecl [ [d| f :: T1 -> T2 ; f = ... |] ]^^ creates the function specified as well as the various dictionaries and static versions that ] also creates. ^9 is sometimes necessary when you want to refer to, say, $(mkClosure 'f) within the definition of f itself.NOTE: ^ creates __remoteTableDecl instead of  __remoteTable so that you can use both ] and ^ within the same module._Construct a static value.If f : forall a1 .. an. T then +$(mkStatic 'f) :: forall a1 .. an. Static T. Be sure to pass f to ].`If  f : T1 -> T2! is a monomorphic function then 3$(functionSDict 'f) :: Static (SerializableDict T1).Be sure to pass f to ].aIf f : T1 -> Process T2! is a monomorphic function then 3$(functionTDict 'f) :: Static (SerializableDict T2).Be sure to pass f to ].bIf  f : T1 -> T2 then #$(mkClosure 'f) :: T1 -> Closure T2.dTODO: The current version of mkClosure is too polymorphic (@forall a. Binary a => a -> Closure T2).cMake a ClosureO from a static function. This is useful for making a closure for a top-level  Process () function, because using b would require adding a dummy () argument.7Generate the code to add the metadata to the CH runtime@Turn a polymorphic type into a monomorphic type using ANY and coGenerate a static value.Generate a serialization dictionary with name n for type typCompose a set of expressionsLiteral string as an expressionJLook up the "original name" (module:name) and type of a top-level function Variation on 7 which takes a single expression to define the function.The name of a type variable binding occurrence@Fully qualified name; that is, the name and the _current_ moduleqWe ignore the module part of the Name argument (which may or may not exist) because we construct various names (, , :) and those names certainly won't have Module components.]^_`abc]^_`abc]^_`abc]^_`abcNoneOTdSpawn a processFor more information about , see #Control.Distributed.Process.Closure. See also g.eSpawn a process and link to it5Note that this is just the sequential composition of d and . (The Unified\ semantics that underlies Cloud Haskell does not even support a synchronous link operation)fLike e!, but monitor the spawned processg/Run a process remotely and wait for it to replyRWe monitor the remote process: if it dies before it can send a reply, we die too.For more information about ,  , and , see #Control.Distributed.Process.Closure. See also d.hZSpawn a child process, have the child link to the parent and the parent monitor the childi-Spawn a new process, supplying it with a new  and return the corresponding .defghidefghidefghidefghi(c) Well-Typed / Tim WatsonBSD3 (see the file LICENSE)%Tim Watson <watson.timothy@gmail.com> experimental#non-portable (requires concurrency)None !"/059;AMTjPublishes an arbitrary  Serializable1 message to the management event bus. Note that (no attempt is made to force the argument, therefore it is very important that you do not pass unevaluated thunks that might crash the receiving process via this API, since allh registered agents will gain access to the data structure once it is broadcast by the agent controller.k Return the # for the currently executing agent.lThe  version of j.mGracefully terminate an agent.n=Continue executing (i.e., receiving and processing messages).oCauses the currently executing  event sink to be skipped. The remaining declared event sinks will be evaluated to find a matching handler. Can be used to allow multiple event sinks to process data of the same type.p?Continue exeucting, prioritising inputs from the process' own mailbox- ahead of data from the management event bus.q]Continue exeucting, prioritising inputs from the management event bus over the process' own mailbox.rLift a Process action.sSet the agent's local state.tUpdate the agent's local state.uFetch the agent's local state.v Create an w from an expression taking a  Serializable type m, that yields an x in the  monad.wActivates a new agent.x,Activates a new agent. This variant takes a  finalizer_ expression, that is run once the agent shuts down (even in case of failure/exceptions). The  finalizer$ expression runs in the mx monad -  MxAgent s ()Z - such that the agent's internal state remains accessible to the shutdown/cleanup code.jklmnopqrstuvwx#wxjklmnopqrstuvwx#jxwxwvkmnopqlsutrjklmnopqrstuvwxNone9; JConverts a list of identifiers (that can be mapped to process ids), to a .y/Turn tracing for for a subset of trace targets.zTrace all targets.{Trace no targets.|'Enable tracing to the supplied process.}6Enable tracing to the supplied process and wait for a TraceOk. response from the trace coordinator process.~'Disable the currently configured trace.6Disable the currently configured trace and wait for a TraceOk. response from the trace coordinator process.+Set the given flags for the current tracer.:Set the given flags for the current tracer and wait for a TraceOk. response from the trace coordinator process.wSend a log message to the internal tracing facility. If tracing is enabled, this will create a custom trace log event.XSend a log message to the internal tracing facility, using the given list of printable ,s interspersed with the preceding delimiter.Send an arbitrary Message to the tracer process.yz{|}~yz{|}~}|~yz{yz{|}~None Remote Table. Starts a  trace relayZ process on the remote node, which forwards all trace events to the registered tracer on this (the calling process') node.5Set the given flags for a remote node (asynchronous).NoneT          None!"TA triple containing a configured tracer, weak pointer to the agent controller's mailbox (CQueue) and an expression used to instantiate new agents on the current node.Starts a management agent for the current node. The agent process must not crash or be killed, so we generally avoid publishing its  ProcessId where possible.cOur process is also responsible for forwarding messages to the trace controller, since having two special processes handled via the  LocalNodeh would be inelegant. We forward messages directly to the trace controller's message queue, just as the  MxEventBus that's set up on the  LocalNode forwards messages directly to us. This optimises the code path for tracing and avoids overloading the node node controller's internal control plane with additional routing, at the cost of a little more complexity and two cases where we break encapsulation./Forks a new process in which an mxAgent is run.Start the tracer controller."Start a dead letter (agent) queue.If no agents are registered on the system, the management event bus will fill up and its data won't be GC'ed until someone comes along and reads from the broadcast channel (via dupTChan of course). This is effectively a leak, so to mitigate it, we start a dead letter queue that drains the event bus continuously, thus ensuring if there are no other consumers that we won't use up heap space unnecessarily.SafeA bidirectional multimaps BiMultiMap a b v is a set of triplets of type  (a, b, v).0It is possible to lookup values by using either a or b as keys.!The empty bidirectional multimap.5A bidirectional multimap containing a single triplet..Yields the amount of triplets in the multimap."Inserts a triplet in the multimap.CLooks up all the triplets whose first component is the given value.DLooks up all the triplets whose second component is the given value.RDeletes a triplet. It yields the original multimap if the triplet is not present.>Deletes all triplets whose first component is the given value.Like 5 but deletes by the second component of the triplets.cYields the triplets satisfying the given predicate, and a multimap with all this triplets removed.Like R but the predicates takes the second component of the triplets as first argument.=Exchange the first and the second components of all triplets.reverseDelete a bs m removes from m all the triplets wich have a8 as first component and second and third components in bs.The m\ map is in reversed form, meaning that the second component of the triplets is used as key.nothingWhen p a is Just a when a satisfies predicate p . Yields Nothing otherwise.  None !"0BIOT (Thrown in response to the user invoking kill` (see Primitives.hs). This type is deliberately not exported so it cannot be caught explicitly.Initialize a new local node.?Create a new local node (without any service processes running)2Start and register the service processes on a node=Force-close a local node, killing all processes on that node.7Run a process on a local node and wait for it to finish#Spawn a new process on a local node Unified: Table 8+Check if a process is local to our own nodeLookup a local closure 5Check if an identifier refers to a valid local object!splitNotif identO splits a notifications map into those notifications that should trigger when ident( fails and those links that should not.There is a hierarchy between identifiers: failure of a node implies failure of all processes on that node, and failure of a process implies failure of all typed channels to that process. In other words, if ident refers to a node, then the should trigger set will include+the notifications for the node specifically1the notifications for processes on that node, and?the notifications for typed channels to processes on that node.Similarly, if ident refers to a process, the should trigger set will include3the notifications for that process specifically and5the notifications for typed channels to that process.See  /https://github.com/haskell/containers/issues/14 for the bang on _v."Modify and evaluate the stateQ#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJWho's watching?Who's being watched? to linkKLMNOPQRSTUVWXYWho to notify? Who died?How did they die? for linking Z[\]^_`abc!"B#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXY Z[\]^_`abc!"(c) Well-Typed / Tim WatsonBSD3 (see the file LICENSE)%Tim Watson <watson.timothy@gmail.com> experimental#non-portable (requires concurrency)NoneOTnStarts a new tracer, using the supplied trace function. Only one tracer can be registered at a time, however thisO function overlays the registered tracer with the supplied handler, allowing the user to layer multiple tracers on top of one another, with trace events forwarded down through all the layers in turn. Once the top layer is stopped, the user is responsible for re-registering the original (prior) tracer pid before terminating. See # for a mechanism that handles that. Evaluate proc with tracing enabled via handlerk, and immediately disable tracing thereafter, before giving the result (or exception in case of failure). Evaluate procf with the supplied flags enabled. Any previously set trace flags are restored immediately afterwards.*Stops a user supplied tracer started with |. Note that only one tracer process can be active at any given time. This process will stop the last process started with . If  is called multiple times, successive calls to this function will stop the tracers in the reverse order which they were started.This function will never stop the system tracer (i.e., the tracer initially started when the node is created), therefore once all user supplied tracers (i.e., processes started via F) have exited, subsequent calls to this function will have no effect.AIf the last tracer to have been registered was not started with ( then the behaviour of this function is  undefined.d(yz{|}(}|zy{dNone!Spawn a process on the local nodeuCreate a new typed channel, spawn a process on the local node, passing it the receive port, and return the send portLocal version of g. Running a process in this way isolates it from messages sent to the caller process, and also allows silently dropping late or duplicate messages sent to the isolated process after it exits. Silently dropping messages may not always be the best approach.VWXYZ[\]^_`abcdefghijtwuvxy|}~      !"#$%&'()*+,-./0123456789:;<=>?defghi)9;    dg |}jVWXYZ[\]^_`abc-.+,~tuvwxy<=/014682357:fgde (!"#$%&'*hefihi>?None%&09:;<=?CDTWA RemoteRegister is a trasformer on a RemoteTable to register additional static values.vThis takes an explicit name and a value, and produces both a static reference to the name and a RemoteRegister for it.This takes an explicit name, a function of arity one, and creates a creates a function yielding a closure and a remote register for it.|This takes an explict name, a function of any arity, and creates a function yielding a closure and a remote register for it.<Works just like standard call, but with a simpler signature.efghijklmnopqrefghijklmnopqr/None" FHIJKLMOPQRSUVWXYZ]^_`abc" HIJKLMFOPQSRUVZWXY]^_bc`as01203456756856956:;<<==>?@ABCDEFGHIJKLMMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|} ~                                                                                                                     ! !"#$%&"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~00Dh0000000         4  !"#$%&'()*+,-./01u23456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\0distributed-process-0.7.1-DCxBM0ssRbbD4H99ZjrcL7Control.Distributed.Process(Control.Distributed.Process.Serializable/Control.Distributed.Process.Internal.WeakTQueue/Control.Distributed.Process.Internal.StrictMVar/Control.Distributed.Process.Internal.StrictList=Control.Distributed.Process.Internal.StrictContainerAccessors+Control.Distributed.Process.Internal.CQueue*Control.Distributed.Process.Internal.Types.Control.Distributed.Process.Internal.Messaging5Control.Distributed.Process.Management.Internal.Types,Control.Distributed.Process.UnsafePrimitives3Control.Distributed.Process.Management.Internal.Bus;Control.Distributed.Process.Management.Internal.Trace.Types/Control.Distributed.Process.Internal.Primitives4Control.Distributed.Process.Internal.Closure.BuiltIn/Control.Distributed.Process.Internal.Closure.TH*Control.Distributed.Process.Internal.Spawn&Control.Distributed.Process.Management@Control.Distributed.Process.Management.Internal.Trace.Primitives>>>=#Control.Distributed.Process.ClosurebaseControl.Monad.IO.ClassliftIOGHC.Fingerprint.Type Fingerprint/distributed-static-0.3.7-GE2rRmcO4OW461E76FQdK8Control.Distributed.StaticclosureStatic RemoteTableClosure Serializable TypeableDictSerializableDictencodeFingerprintdecodeFingerprintsizeOfFingerprint fingerprintshowFingerprint$fSerializableaTQueue newTQueue newTQueueIO writeTQueue readTQueue tryReadTQueue isEmptyTQueue mkWeakTQueue $fEqTQueue StrictMVar newEmptyMVarnewMVartakeMVarputMVarreadMVarwithMVar modifyMVar_ modifyMVarmodifyMVarMasked mkWeakMVar StrictListConsNilSnocAppendappendfoldrmapMaybe mapDefaultMatchOnMatchMsg MatchChan BlockSpec NonBlockingBlockingTimeoutCQueue newCQueueenqueue enqueueSTMdequeue mkWeakCQueue queueSize$fFunctorMatchOn ProcessSignalLinkUnlinkMonitor UnmonitorDiedSpawnWhereIsRegister NamedSendUnreliableSend LocalSend LocalPortSendKillExitGetInfo SigShutdown GetNodeStatsNCMsg ctrlMsgSender ctrlMsgSignalProcessInfoNone ProcessInfoinfoNodeinfoRegisteredNamesinfoMessageQueueLength infoMonitors infoLinks NodeStats nodeStatsNodenodeStatsRegisteredNamesnodeStatsMonitorsnodeStatsLinksnodeStatsProcesses RegisterReply WhereIsReplyDidSpawnSpawnRef DidUnlinkPort DidUnlinkNodeDidUnlinkProcess DidUnmonitor DiedReason DiedNormal DiedExceptionDiedDisconnect DiedNodeDown DiedUnknownIdProcessExitExceptionProcessRegistrationExceptionPortLinkExceptionNodeLinkExceptionProcessLinkExceptionPortMonitorNotificationNodeMonitorNotificationProcessMonitorNotification MonitorRefmonitorRefIdentmonitorRefCounterMessageEncodedMessageUnencodedMessagemessageFingerprintmessageEncodingmessagePayload ReceivePort receiveSTMSendPort sendPortId TypedChannel SendPortIdsendPortProcessIdsendPortLocalIdLocalSendPortIdProcess unProcessLocalProcessState_monitorCounter _spawnCounter_channelCounter_typedChannels LocalProcess processQueue processWeakQ processId processState processThread processNodeNodeClosedExceptionValidLocalNodeState_localProcesses_localPidCounter_localPidUnique_localConnectionsLocalNodeStateLocalNodeValidLocalNodeClosedImplicitReconnectWithImplicitReconnectNoImplicitReconnect LocalNode localNodeId localEndPoint localState localCtrlChan localEventBus remoteTable MxEventBusMxEventBusInitialisingagenttracerevbussmxNewTracer tracerPidweakQ IdentifierNodeIdentifierProcessIdentifierSendPortIdentifier ProcessId processNodeIdprocessLocalIdLocalProcessId lpidUnique lpidCounterNodeId nodeAddressnodeOffirstNonReservedProcessId nullProcessIdwithValidLocalStatemodifyValidLocalStatemodifyValidLocalState_runLocalProcess isEncoded createMessagecreateUnencodedMessageunsafeCreateUnencodedMessagemessageToPayloadpayloadToMessagelocalProcesseslocalPidCounterlocalPidUniquelocalConnectionslocalProcessWithIdlocalConnectionBetweenmonitorCounter spawnCounterchannelCounter typedChannelstypedChannelWithIdforever'$fBinaryProcessInfoNone$fBinaryNodeStats$fBinaryProcessInfo$fBinaryRegisterReply$fBinaryWhereIsReply$fBinaryIdentifier$fBinarySendPortId$fBinaryDidSpawn$fBinaryDiedReason$fBinaryProcessSignal$fBinaryMonitorRef $fBinaryNCMsg$fBinaryPortMonitorNotification$fBinaryNodeMonitorNotification"$fBinaryProcessMonitorNotification$fBinaryLocalProcessId$fBinaryMessage$fNFDataDiedReason'$fExceptionProcessRegistrationException$fExceptionPortLinkException$fExceptionNodeLinkException$fExceptionProcessLinkException$fShowProcessExitException$fExceptionProcessExitException$fNFDataMonitorRef$fHashableMonitorRef $fShowMessage$fNFDataMessage$fNFDataSendPort$fHashableSendPort$fBinarySendPort$fNFDataSendPortId$fShowSendPortId$fHashableSendPortId$fMonadMaskProcess$fMonadCatchProcess$fMonadThrowProcess$fExceptionNodeClosedException$fShowIdentifier$fNFDataIdentifier$fHashableIdentifier$fShowProcessId$fHashableProcessId$fNFDataProcessId$fBinaryProcessId$fHashableLocalProcessId $fShowNodeId$fHashableNodeId$fNFDataNodeId$fBinaryNodeId $fEqNodeId $fOrdNodeId $fDataNodeId$fGenericNodeId$fEqLocalProcessId$fOrdLocalProcessId$fDataLocalProcessId$fGenericLocalProcessId$fShowLocalProcessId $fEqProcessId$fOrdProcessId$fDataProcessId$fGenericProcessId$fEqImplicitReconnect$fShowImplicitReconnect$fShowNodeClosedException$fEqSendPortId$fOrdSendPortId$fGenericSendPortId$fEqIdentifier$fOrdIdentifier$fGenericIdentifier$fGenericSendPort$fShowSendPort $fEqSendPort $fOrdSendPort$fFunctorReceivePort$fApplicativeReceivePort$fAlternativeReceivePort$fMonadReceivePort$fEqMonitorRef$fOrdMonitorRef$fShowMonitorRef$fGenericMonitorRef"$fShowProcessRegistrationException$fShowDiedReason$fEqDiedReason$fShowPortLinkException$fShowNodeLinkException$fShowProcessLinkException$fShowPortMonitorNotification$fShowNodeMonitorNotification $fShowProcessMonitorNotification$fBinaryDidUnmonitor$fBinaryDidUnlinkProcess$fBinaryDidUnlinkNode$fBinaryDidUnlinkPort$fShowSpawnRef$fBinarySpawnRef $fEqSpawnRef $fOrdSpawnRef$fShowDidSpawn$fShowWhereIsReply$fShowRegisterReply$fShowNodeStats $fEqNodeStats$fShowProcessInfo$fEqProcessInfo$fShowProcessInfoNone$fShowProcessSignal$fApplicativeProcess$fFunctorProcess$fMonadProcess$fMonadFixProcess$fMonadIOProcess$fMonadReaderProcess $fShowNCMsg sendPayload sendBinary sendMessage disconnectcloseImplicitReconnectionsimpliesDeathOf sendCtrlMsgMxSinkMxActionMxAgentDeactivateMxAgentPrioritise MxAgentReady MxAgentSkipChannelSelector InputChanMailboxMxAgentunAgent MxAgentState mxAgentIdmxBus mxLocalState MxAgentIdagentIdFork Addressable resolveToPidMxEvent MxSpawned MxRegisteredMxUnRegistered MxProcessDied MxNodeDiedMxSent MxReceived MxConnectedMxDisconnectedMxUserMxLogMxTraceTakeoverMxTraceDisable$fAddressableMxEvent$fBinaryMxEvent$fGenericMxEvent $fShowMxEvent$fBinaryMxAgentId $fEqMxAgentId$fOrdMxAgentId$fFunctorMxAgent$fMonadMxAgent$fMonadIOMxAgent$fMonadStateMxAgent$fApplicativeMxAgentnsend nsendRemotesendusendsendChan wrapMessage publishEventTraceOkTraceArgTraceStrTrace TraceFlags traceSpawned traceDiedtraceRegisteredtraceUnregistered traceSend traceRecv traceNodestraceConnections TraceSubjectTraceAll TraceProcs TraceNamesSetTrace TraceEnable TraceDisabledefaultTraceFlagstraceLog traceLogFmt traceEvent traceMessage enableTraceenableTraceSync disableTracedisableTraceSync setTraceFlagssetTraceFlagsSync getTraceFlagsgetCurrentTraceClient $fTraceable[]$fTraceableProcessId$fBinaryTraceOk$fBinaryTraceFlags$fBinaryTraceSubject$fBinarySetTrace$fGenericSetTrace $fEqSetTrace$fShowSetTrace$fGenericTraceSubject$fShowTraceSubject$fGenericTraceFlags$fShowTraceFlags$fGenericTraceOk SayMessagesayTime sayProcess sayMessageHandlerProcessTerminationExceptionMatch unsafeSend unsafeUSendexpectnewChanunsafeSendChan receiveChanreceiveChanTimeoutmergePortsBiased mergePortsRR receiveWaitreceiveTimeout matchChanmatchSTMmatchmatchIf matchMessagematchMessageIfforwarduforwardunsafeWrapMessage unwrapMessage handleMessagehandleMessageIfhandleMessage_handleMessageIf_matchAny matchAnyIf matchUnknowndelegaterelayproxy terminatediekillexit catchExit catchesExit getSelfPid getSelfNode getNodeStatsgetLocalNodeStatsgetProcessInfolinkmonitor withMonitor withMonitor_unlink unlinkNode unlinkPort unmonitor expectTimeout spawnAsync monitorNode monitorPortlinkNodelinkPortsayregister reregisterregisterRemoteAsyncreregisterRemoteAsync unregisterunregisterRemoteAsyncwhereiswhereisRemoteAsync unsafeNSendunsafeNSendRemoteunStatic unClosure reconnect reconnectPort$fBinarySayMessage$fShowSayMessage$fFunctorHandler&$fExceptionProcessTerminationException$fFunctorMatch!$fShowProcessTerminationExceptionCP staticDecode sdictUnitsdictProcessId sdictSendPort sdictStatic sdictClosure sndStaticidCPsplitCPreturnCPseqCPbindCPdecodeProcessIdStaticcpLinkcpUnlinkcpSendcpExpect cpNewChancpRelaycpEnableTraceRemote cpDelayed remotable remotableDeclmkStatic functionSDict functionTDict mkClosuremkStaticClosurespawn spawnLink spawnMonitorcallspawnSupervised spawnChannelmxNotifymxGetId mxBroadcast mxDeactivatemxReadymxSkip mxReceive mxReceiveChanliftMX mxSetLocal mxUpdateLocal mxGetLocalmxSinkmxAgentmxAgentWithFinalize traceOnlytraceOntraceOffenableTraceAsyncdisableTraceAsyncsetTraceFlagsAsyncwithLocalTracerwithRegisteredTracerstartTraceRelaysetTraceFlagsRemote defaultTracersystemLoggerTracereventLogTracer logfileTracertraceController AgentConfigmxAgentController mxStartAgent startTracingstartDeadLetterQueue BiMultiMapempty singletonsizeinsert lookupBy1st lookupBy2nddeletedeleteAllBy1stdeleteAllBy2ndpartitionWithKeyBy1stpartitionWithKeyBy2ndflipinitRemoteTable newLocalNodecloseLocalNode runProcess forkProcess$fShowProcessKillException$fExceptionProcessKillException$fApplicativeNC $fFunctorNC $fMonadNC $fMonadIONC$fMonadStateNC$fMonadReaderNC startTracer withTracer withFlags stopTracer spawnLocalspawnChannelLocal callLocalMkTDictmkTDictRemoteRegister mkStaticValmkClosureValSingle mkClosureValcall'$fIsFunctionab$fIsFunction(->)b$fUncurry''argsfuncresult$fUncurryHFalseEndOfTupleaa$fUncurryHTrue(,)(->)r$fCurry(->)(->)$fCurry(->)(->)0$fBinaryEndOfTuple $fMkTDicta$fMkTDictProcessData.Typeable.InternalTypeable GHC.Conc.Sync atomicallyghc-prim GHC.TypesTrue spanMatchMsg spanMatchChan MatchChunks chunkMatchesGHC.BaseNothingString GHC.Exception Exceptionbinary-0.8.3.0Data.Binary.ClassBinaryFunctor Applicative AlternativeMonadsetupConnBetween connBetween TraceableuodunmonitorAsync unlinkAsyncunlinkNodeAsyncunlinkPortAsynchandleRegistrationReplymonitor'link'unMatchcatchesHandler putUTCTime getUTCTime registerImpl sendLocal sendChanLocalgetMonitorRefFor getSpawnRefdelayreturnProcessStaticcreateMetaData monomorphizegenerateStatic generateDictcomposestringEgetTypesfnDtemplate-haskellLanguage.Haskell.TH.LibfunD tyVarBndrNameshowFQN staticName sdictName tdictName generateDefs MxPipelineMxStopcurrentnextwithLocalTracerSyncenableTraceRemote TracerStateTracerSTclientflagsregNamesdefaultTracerAuxdefaultEventLogTracercheckEnv nullTracerapplyTraceFlags handleTracetraceEv sendTrace sendTraceMsg reverseDelete nothingWhenProcessKillExceptioncreateBareLocalNodestartServiceProcessesdestNidisLocalisValidLocalIdentifier splitNotifmodify'NCunNCNCState_links _monitors_registeredHere_registeredOnNodesConnectionState _incoming _incomingFromIncomingTargetUninitToProcToChanToNodeIncomingConnectionblockunblock startMxAgentstartDefaultTracerinitConnectionStateincoming incomingAt incomingFromhandleIncomingMessagesrunNodeController initNCStatencSendToProcessncSendToProcessAndTrace ncSendToNodetraceNotifyDiedtraceEventFmtIOtracenodeControllerncEffectMonitorncEffectUnlinkncEffectUnmonitor ncEffectDied ncEffectSpawnncEffectRegisterncEffectWhereIsncEffectNamedSendncEffectLocalSendncEffectLocalSendAndTracencEffectLocalPortSend ncEffectKill ncEffectExitncEffectGetInfoncEffectGetNodeStats notifyDied postAsMessage postMessagethrowException withLocalProclinksmonitorsregisteredHereregisteredOnNodesregisteredHereForregisteredOnNodesFor traceProxy IsFunctionUncurryreify' Uncurry''reifyFunDoneMoarHFalseHTrueCurrycurryFun EndOfTupleuncurry'