h*3P      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                     0.2.7.0  Safe-Inferred (c) Tim Watson 2017BSD3 (see the file LICENSE)%Tim Watson  experimental#non-portable (requires concurrency) Safe-Inferred%&7< !distributed-process-client-serverWe hold timers in 2 states, each described by a Delay. isActive = isJust . mtSignal the TimerRef is optional since we only use the Timer module from extras when we're unable to registerDelay (i.e. not running under -threaded)!distributed-process-client-serverUsed during STM reads on Timers and to implement blocking. Since timers can be associated with a TimerKey, the second constructor for this type yields a key indicating whic Timer it refers to. Note that the user is responsible for establishing and maintaining the mapping between Timers and their keys.!distributed-process-client-server>A key for storing timers in prioritised process backing state.!distributed-process-client-serverTrue if a Timer is currently active.!distributed-process-client-serverCreates a default Timer which is inactive.!distributed-process-client-server Starts a Timer Will use the GHC  registerDelay API if rtsSupportsBoundThreads == True !distributed-process-client-serverStops a previously started Timer. Has no effect if the Timer is inactive. !distributed-process-client-serverClears and restarts a Timer. !distributed-process-client-server5Clears/cancels a running timer. Has no effect if the Timer is inactive. !distributed-process-client-server Creates a Match for a given timer, for use with Cloud Haskell's messaging primitives for selective receives. !distributed-process-client-server&Create a match expression for a given Timer:. When the timer expires (i.e. the "TVar Bool" is set to True), the Match will return Yield i , where i is the given TimerKey.!distributed-process-client-server*As "matchKey", but instead of a returning Yield i, the generated Match= handler evaluates the first argument - and expression from TimerKey to Process Message - to determine its result.!distributed-process-client-serverReads a given  TVar Bool for a timer, and returns  STM TimedOut) once the variable is set to true. Will retry in the meanwhile.   Safe-Inferred67<9!distributed-process-client-serverStores the functions that determine runtime behaviour in response to incoming messages and a policy for responding to unhandled messages.!distributed-process-client-server(functions that handle call/cast messages!distributed-process-client-server,functions that handle non call/cast messages!distributed-process-client-server4functions that handle control channel and STM inputs!distributed-process-client-server"functions that handle exit signals!distributed-process-client-server a function that handles timeouts!distributed-process-client-server4a function that is run just before the process exits!distributed-process-client-server#how to deal with unhandled messages!distributed-process-client-serverPolicy for handling unexpected messages, i.e., messages which are not sent using the  or cast0 APIs, and which are not handled by any of the  handleInfo handlers.!distributed-process-client-serverstop immediately, giving  ExitOther UnhandledInput as the reason!distributed-process-client-server*forward the message to the given recipient !distributed-process-client-server)log messages, then behave identically to Drop!!distributed-process-client-server(dequeue and then drop/ignore the message"!distributed-process-client-serverA ProcessDefinition decorated with DispatchPriority for certain input domains.(!distributed-process-client-serverFor a "+, this policy determines for how long the  receive loop should continue draining the process' mailbox before processing its received mail (in priority order).If a prioritised managed process+ is receiving a lot of messages (into its real mailbox), the server might never get around to actually processing its inputs. This (mandatory) policy provides a guarantee that eventually (i.e., after a specified number of received messages or time interval), the server will stop removing messages from its mailbox and process those it has already received.+!distributed-process-client-server#Dispatcher for prioritised handlers0!distributed-process-client-server%Priority of a message, encoded as an Int3!distributed-process-client-serverDefines the means of dispatching messages from external channels (e.g. those defined in terms of ControlChannel , and STM actions) to a handler.6!distributed-process-client-server>Defines the means of dispatching inbound messages to a handler8!distributed-process-client-server0Provides dispatch for any exit signal - returns  for unhandled exceptions;!distributed-process-client-server)Provides dispatch for any input, returns  for unhandled messages.>!distributed-process-client-server.Provides dispatch for channels and STM actionsG!distributed-process-client-serverProvides dispatch from cast and call messages to a typed handler.L!distributed-process-client-serverProvides dispatch from a variety of inputs to a typed filter handler.U!distributed-process-client-server$Given as the result of evaluating a DispatchFilter. This type is intended for internal use. For an API for working with filters, see 3Control.Distributed.Process.ManagedProcess.Priority.[!distributed-process-client-serverThe writable end of a ^.^!distributed-process-client-server?@ABCDEF;<=89:67345rtsuz{|}~vwxynmlkgjihfedcbopqa !012+,-./LMNOPQRSTUVWXYZ"#$%&'()*^_`[\]GHIJK>?@ABCDEF;<=89:67345(c) Tim Watson 2012 - 2017BSD3 (see the file LICENSE)%Tim Watson  experimental#non-portable (requires concurrency) Safe-Inferredi2!distributed-process-client-server Creates a r, from a function that takes a process state a and an input message b and returns a 7 indicating whether the associated handler should run.!distributed-process-client-server Create a r, from a function that takes a process state a and returns a 6 indicating whether the associated handler should run.!distributed-process-client-server Creates a r- from a function that takes an input message m and returns a 6 indicating whether the associated handler should run.!distributed-process-client-server,Reject the message we're currently handling.!distributed-process-client-serverReject the message we're currently handling, giving an explicit reason.!distributed-process-client-server;Instructs the process to send a reply and continue running.!distributed-process-client-server&Instructs the process to send a reply and evaluate the z.!distributed-process-client-server.Instructs the process to skip sending a reply and evaluate a z!distributed-process-client-server>Continue without giving a reply to the caller - equivalent to *, but usable in a callback passed to the  family of functions.!distributed-process-client-serverHalt process execution during a call handler, without paying any attention to the expected return type.!distributed-process-client-serverInstructs the process to continue running and receiving messages.!distributed-process-client-server Version of 8 that can be used in handlers that ignore process state.!distributed-process-client-server?Instructs the process loop to wait for incoming messages until  is exceeded. If no messages are handled during this period, the timeout handler will be called. Note that this alters the process timeout permanently such that the given Delay" will remain in use until changed. Note that timeoutAfter NoDelay will cause the timeout handler to execute immediately if no messages are present in the process' mailbox.!distributed-process-client-server Version of 8 that can be used in handlers that ignore process state.  timeoutAfter_ duration)!distributed-process-client-serverInstructs the process to  hibernate for the given . Note that no messages will be removed from the mailbox until after hibernation has ceased. This is equivalent to calling  threadDelay.!distributed-process-client-server Version of 8 that can be used in handlers that ignore process state. 5action (\(HibernatePlease delay) -> hibernate_ delay)!distributed-process-client-server2The server loop will execute against the supplied , allowing the process to change its behaviour (in terms of message handlers, exit handling, termination, unhandled message policy, etc)!distributed-process-client-serverInstructs the process to terminate, giving the supplied reason. If a valid * is installed, it will be called with the 8 returned from this call, along with the process state.!distributed-process-client-serverAs 9, but provides an updated state for the shutdown handler.!distributed-process-client-server Version of 8 that can be used in handlers that ignore process state. )action (\ClientError -> stop_ ExitNormal)!distributed-process-client-server%Sends a reply explicitly to a caller. replyTo = sendTo!distributed-process-client-serverSends a reply to a  (for use in  et al). replyChan = sendChan!distributed-process-client-server Constructs a call handler from a function in the  monad. The handler expression returns the reply, and the action will be set to . 0handleCall_ = handleCallIf_ $ input (const True)!distributed-process-client-server Constructs a call* handler from an ordinary function in the < monad. This variant ignores the state argument present in  and  and is therefore useful in a stateless server. Messges are only dispatched to the handler if the supplied condition evaluates to TrueSee !distributed-process-client-server Constructs a call handler from a function in the 1 monad. > handleCall = handleCallIf (const True)!distributed-process-client-server Constructs a call* handler from an ordinary function in the  monad. Given a function +f :: (s -> a -> Process (ProcessReply b s)), the expression  handleCall f will yield a  Dispatcher for inclusion in a  Behaviour specification for the  GenProcess. Messages are only dispatched to the handler if the supplied condition evaluates to True.!distributed-process-client-server A variant of ! that ignores the state argument.!distributed-process-client-server A variant of ! that ignores the state argument.!distributed-process-client-serverAs  but passes the = to the handler function. This can be useful if you wish to  reply later to the caller by, e.g., spawning a process to do some work and have it replyTo caller response6 out of band. In this case the callback can pass the 5 to the worker (or stash it away itself) and return .!distributed-process-client-serverAs + but only runs the handler if the supplied r evaluates to True.!distributed-process-client-serverCreates a handler for a  typed channel- RPC style interaction. The handler takes a  SendPort b4 to reply to, the initial input and evaluates to a z. It is the handler code's responsibility to send the reply to the SendPort.!distributed-process-client-serverAs , but only evaluates the handler if the supplied condition is met.!distributed-process-client-server A variant of ! that ignores the state argument.!distributed-process-client-server A variant of ! that ignores the state argument.!distributed-process-client-server Constructs a cast* handler from an ordinary function in the 2 monad. > handleCast = handleCastIf (const True)!distributed-process-client-server Constructs a cast* handler from an ordinary function in the  monad. Given a function *f :: (s -> a -> Process (ProcessAction s)), the expression  handleCall f will yield a G for inclusion in a  Behaviour specification for the  GenProcess.!distributed-process-client-server$Creates a generic input handler for STM, actions, from an ordinary function in the  monad. The STM a action tells the server how to read inputs, which when presented are passed to the handler in the same manner as  handleInfo messages would be.Note that messages sent to the server's mailbox will never match this handler, only data arriving via the STM a action will.Notably, this kind of handler can be used to pass non-serialisable data to a server process. In such situations, the programmer is responsible for managing the underlying STM5 infrastructure, and the server simply composes the STM a action with the other reads on its mailbox, using the underlying matchSTM API from distributed-process.NB: this function cannot be used with a prioristised process definition.!distributed-process-client-server Version of handleExternal that ignores state.!distributed-process-client-serverHandle call( style API interactions using arbitrary STM actions. The usual  CallHandler is preceded by an stm action that, when evaluated, yields a value, and a second expression that is used to send a reply back to the caller. The corrolary client API is callSTM.!distributed-process-client-server Constructs a control channel! handler from a function in the : monad. The handler expression returns no reply, and the control message% is treated in the same fashion as a cast.  stop_ ExitNormal)!distributed-process-client-serverConstructs a handler for both call and cast messages. .handleDispatch = handleDispatchIf (const True)!distributed-process-client-serverConstructs a handler for both call and cast messages. Messages are only dispatched to the handler if the supplied condition evaluates to True. Handlers defined in this way have no access to the call context (if one exists) and cannot therefore reply to calls.!distributed-process-client-serverCreates a generic input handler (i.e., for received messages that are not sent using the cast or call) APIs) from an ordinary function in the  monad.!distributed-process-client-serverHandle completely raw input messages.!distributed-process-client-server Creates an  exit handler scoped to the execution of any and all the registered call, cast and info handlers for the process.!distributed-process-client-serverConditional version of  handleExit!distributed-process-client-server7predicate that must be satisfied for the handler to run!distributed-process-client-server+a function from an input message to a reply!distributed-process-client-server7predicate that must be satisfied for the handler to run!distributed-process-client-servera reply yielding function over the process state and input message!distributed-process-client-server7predicate that must be satisfied for the handler to run!distributed-process-client-servera reply yielding function over the process state, sender and input message!distributed-process-client-server7predicate that must be satisfied for the handler to run!distributed-process-client-serveran action yielding function over the process state and input message!distributed-process-client-server(the receiving end of the control channel!distributed-process-client-serveran action yielding function over the process state and input message!distributed-process-client-server7predicate that must be satisfied for the handler to run!distributed-process-client-server'a function from the input message to a stateless action, cf !distributed-process-client-server'a function from the input message to a stateless action, cf 22(c) Tim Watson 2012 - 2017BSD3 (see the file LICENSE)%Tim Watson  experimental#non-portable (requires concurrency) Safe-Inferred7y!distributed-process-client-serverThe result of a safe  handler's execution.!distributed-process-client-servercontinue executing!distributed-process-client-server#timeout if no messages are received!distributed-process-client-serverhibernate (i.e., sleep)!distributed-process-client-server!stop/terminate the server process!distributed-process-client-serverThe result of a call handler's execution.!distributed-process-client-serverreply with the given term!distributed-process-client-server+reply with the given term and enter timeout!distributed-process-client-server'reply with the given term and hibernate!distributed-process-client-server&stop the process with the given reason!distributed-process-client-serverRestricted (i.e., pure, free from side effects) execution environment for callcastinfo handlers to execute in.!distributed-process-client-server3Log a trace message using the underlying Process's say!distributed-process-client-serverGet the current process state!distributed-process-client-serverPut a new process state state!distributed-process-client-server7Apply the given expression to the current process state!distributed-process-client-server;Instructs the process to send a reply and continue running.!distributed-process-client-server>Continue without giving a reply to the caller - equivalent to *, but usable in a callback passed to the  family of functions.!distributed-process-client-serverHalt process execution during a call handler, without paying any attention to the expected return type.!distributed-process-client-serverInstructs the process to continue running and receiving messages.!distributed-process-client-server?Instructs the process loop to wait for incoming messages until  is exceeded. If no messages are handled during this period, the timeout handler will be called. Note that this alters the process timeout permanently such that the given Delay" will remain in use until changed.!distributed-process-client-serverInstructs the process to  hibernate for the given . Note that no messages will be removed from the mailbox until after hibernation has ceased. This is equivalent to evaluating liftIO . threadDelay.!distributed-process-client-serverInstructs the process to terminate, giving the supplied reason. If a valid * is installed, it will be called with the 8 returned from this call, along with the process state.!distributed-process-client-serverA version of "Control.Distributed.Process.ManagedProcess.Server.handleCall" that takes a handler which executes in .!distributed-process-client-serverA version of "Control.Distributed.Process.ManagedProcess.Server.handleCallIf" that takes a handler which executes in .!distributed-process-client-serverA version of "Control.Distributed.Process.ManagedProcess.Server.handleCast" that takes a handler which executes in .!distributed-process-client-serverA version of "Control.Distributed.Process.ManagedProcess.Server.handleCastIf" that takes a handler which executes in .!distributed-process-client-serverA version of "Control.Distributed.Process.ManagedProcess.Server.handleInfo" that takes a handler which executes in .!distributed-process-client-serverHandle exit signals!distributed-process-client-serverHandle timeouts!distributed-process-client-server;TODO MonadTrans instance? lift :: (Monad m) => m a -> t m a!distributed-process-client-server7predicate that must be satisfied for the handler to run!distributed-process-client-serveran action yielding function over the process state and input message(c) Tim Watson 2012 - 2017BSD3 (see the file LICENSE)%Tim Watson  experimental#non-portable (requires concurrency) Safe-Inferred !distributed-process-client-serverSend a control message over a [.!distributed-process-client-server8Send a signal instructing the process to terminate. The  receive loop4 which manages the process mailbox will prioritise Shutdown signals higher than any other incoming messages, but the server might be busy (i.e., still in the process of excuting a handler) at the time of sending however, so the caller should not make any assumptions about the timeliness with which the shutdown signal will be handled. If responsiveness is important, a better approach might be to send an  exit signal with  as the reason. An exit signal will interrupt any operation currently underway and force the running process to clean up and terminate.!distributed-process-client-serverMake a synchronous call - will block until a reply is received. The calling process will exit with  if the calls fails..NOTE: this function does not catch exceptions!!distributed-process-client-serverSafe version of  that returns information about the error if the operation fails. If the calling process dies (that is, forces itself to exit such that an exit signal arises with ExitOther String) then evaluation will return Left exitReason. and the explanation will be stashed away as (ExitOther String)..NOTE: this function does not catch exceptions!The safety of the name, comes from carefully handling situations in which the server dies while we're waiting for a reply. Notably, exit signals from other processes, kill signals, and both synchronous and asynchronous exceptions can still terminate the caller abruptly. To avoid this consider masking or evaluating within your own exception handling code.!distributed-process-client-server Version of  that returns  if the operation fails. If you need information about *why* a call has failed then you should use  or combine  catchExit and call instead..NOTE: this function does not catch exceptions!In fact, this API handles fewer exceptions than it's relative, "safeCall". Notably, exit signals, kill signals, and both synchronous and asynchronous exceptions can still terminate the caller abruptly. To avoid this consider masking or evaluating within your own exception handling code (as mentioned above).!distributed-process-client-server0Make a synchronous call, but timeout and return Nothing if a reply is not received within the specified time interval.If the result of the call is a failure (or the call was cancelled) then the calling process will exit, with the  given as the reason. If the call times out however, the semantics on the server side are undefined, i.e., the server may or may not successfully process the request and may (or may not) send a response at a later time. From the callers perspective, this is somewhat troublesome, since the call result cannot be decoded directly. In this case, the "flushPendingCalls" API may be used to attempt to receive the message later on, however this makes no attempt whatsoever to guarantee which call response will in fact be returned to the caller. In those semantics are unsuited to your application, you might choose to exit or die2 in case of a timeout, or alternatively, use the  API and associated  waitTimeout function (in the  Async API), which takes a re-usable handle on which to wait (with timeouts) multiple times.!distributed-process-client-server0Attempt to flush out any pending call responses.!distributed-process-client-serverInvokes   out of band, and returns an  async handle.!distributed-process-client-serverSends a cast% message to the server identified by server=. The server will not send a response. Like Cloud Haskell's , primitive, cast is fully asynchronous and  never fails - therefore ing to a non-existent (e.g., dead) server process will not generate an error.!distributed-process-client-serverSends a channel% message to the server and returns a  ReceivePort on which the reponse can be delivered, if the server so chooses (i.e., the might ignore the request or crash).!distributed-process-client-serverA synchronous version of .!distributed-process-client-serverA safe version of , which returns Left ExitReason if the call fails.!distributed-process-client-server>Manages an rpc-style interaction with a server process, using STM actions to read/write data. The server process is monitored for the duration of the call. The stm write expression is passed the input, and the read expression is evaluated and the result given as Right b or Left ExitReason1 if a monitor signal is detected whilst waiting.%Note that the caller will exit (with ExitOther String*) if the server address is un-resolvable.A note about scheduling and timing guarantees (or lack thereof): It is not possibly to guarantee the contents of  ExitReason in cases where this API fails due to server exits/crashes. We establish a monitor prior to evaluating the stm writer action, however monitor is asychronous and we've no way to know whether or not the scheduler will allow monitor establishment to proceed first, or the stm transaction. As a result, assuming that your server process can diefailexit on evaluating the read end of the STM write we perform here (and we assume this is very likely, since we apply no safety rules and do not even worry about serializing thunks passed from the client's thread), it is just as likely that in the case of failure you will see a reason such as  ExitOther  DiedUnknownId due to the server process crashing before the node controller can establish a monitor.As unpleasant as this is, there's little we can do about it without making false assumptions about the runtime. Cloud Haskell's semantics guarantee us only that we will see some monitor signal in the event of a failure here. To provide a more robust error handling, you can catch/trap failures in the server process and return a wrapper reponse datum here instead. This will still be subject to the failure modes described above in cases where the server process exits abnormally, but that will at least allow the caller to differentiate between expected and exceptional failure conditions.   Safe-Inferred %&7<!!distributed-process-client-serverMaps filters to an action that can take place outside of a expect/recieve block.!distributed-process-client-serverMaps handlers to a dynamic action that can take place outside of a expect/recieve block. This is used by the prioritised process loop.!distributed-process-client-server%Evaluate the given function over the ProcessState s( for the caller, and return the result.!distributed-process-client-serverModify our state.!distributed-process-client-server:Modify our state and return a value (potentially from it).!distributed-process-client-serverSet the current process state.!distributed-process-client-serverSet the mailbox draining timer.!distributed-process-client-serverSet the user timeout applied whilst a prioritised process loop is in a blocking receive.!distributed-process-client-serverAdd a  user timer, bound to the given datum.!distributed-process-client-server Remove a  user timer, for the given key.!distributed-process-client-server!Consume the timer with the given TimerKey!. The timer is removed from the  ProcessState and given to the supplied expression, whose evaluation is given back to the caller.!distributed-process-client-serverThe ProcessDefinition for the current loop.!distributed-process-client-server.The list of prioritisers for the current loop.!distributed-process-client-server)The list of filters for the current loop.!distributed-process-client-serverEvaluates to the user defined state for the currently executing server loop.!distributed-process-client-serverEvaluates to the UnhandledMessagePolicy for the current loop.!distributed-process-client-server Returns a read only view on the internal priority queue.!distributed-process-client-serverThe Timer for the system timeout. See  drainTimeout.!distributed-process-client-serverThe policy for the system timeout. This is used to determine how the loop should limit the time spent draining the real3 process mailbox into our internal priority queue.!distributed-process-client-serverThe Delay for the  drainTimeout.!distributed-process-client-server$The current (user supplied) timeout.!distributed-process-client-server-Update and store the internal priority queue.!distributed-process-client-serverEvaluate any matching  info handler5 with the supplied datum after waiting for at least  TimeInterval'. The process state (for the resulting Action s8) is also given and the process loop will go on as per Server.continue.6Informally, evaluating this expression (such that the Action is given as the result of a handler or filter) will ensure that the supplied message (datum) is availble for processing no sooner than  TimeInterval.&Currently, this expression creates an Action that triggers immediate evaluation in the process loop before continuing with the given state. The process loop stores a  user timeout for the given time interval, which is trigerred like a wait/drain timeout. This implementation is subject to change.!distributed-process-client-server Produce an Action s that, if it is the result of a handler, will cause the server loop to evaluate the supplied expression. This is given in the  GenProcess1 monad, which is intended for internal use only.!distributed-process-client-serverEvaluate an expression in the  monad.!distributed-process-client-server Starts a timer and adds it as a  user timeout.!distributed-process-client-server3Dequeue a message from the internal priority queue.!distributed-process-client-serverPeek at the next available message in the internal priority queue, without removing it.!distributed-process-client-server:Push a message to the head of the internal priority queue.!distributed-process-client-server=Enqueue a message to the back of the internal priority queue.!distributed-process-client-serverEnqueue a message in the internal priority queue. The given message will be evaluated by all the supplied prioritisers, and if none match it, then it will be assigned the lowest possible priority (i.e. put at the back of the queue).!distributed-process-client-serverPrioritised process loop.Evaluating this function will cause the caller to enter a server loop, constantly reading messages from its mailbox (and/or other supplied control planes) and passing these to handler functions in the supplied process definition. Only when it is determined that the server process should terminate - either by the handlers deciding to stop the process, or by an unhandled exit signal or other form of failure condition (e.g. synchronous or asynchronous exceptions).7ensureIOManagerIsRunning before evaluating this loop...!distributed-process-client-serverManaged process loop.Evaluating this function will cause the caller to enter a server loop, constantly reading messages from its mailbox (and/or other supplied control planes) and passing these to handler functions in the supplied process definition. Only when it is determined that the server process should terminate - either by the handlers deciding to stop the process, or by an unhandled exit signal or other form of failure condition (e.g. synchronous or asynchronous exceptions).(c) Tim Watson 2012 - 2017BSD3 (see the file LICENSE)%Tim Watson  experimental#non-portable (requires concurrency) Safe-Inferred%&6g!distributed-process-client-server>Represents a pair of expressions that can be used to define a DispatchFilter.!distributed-process-client-server 100 are rounded to 100, and values < 1 are set to 0.!distributed-process-client-server6Prioritise a call handler, ignoring the server's state!distributed-process-client-serverPrioritise a call handler!distributed-process-client-server6Prioritise a cast handler, ignoring the server's state!distributed-process-client-serverPrioritise a cast handler!distributed-process-client-server7Prioritise an info handler, ignoring the server's state!distributed-process-client-serverPrioritise an info handler*UL*UL(c) Tim Watson 2012 - 2017BSD3 (see the file LICENSE)%Tim Watson  experimental#non-portable (requires concurrency) Safe-Inferred%&6Ŗ !distributed-process-client-server,Reject the message we're currently handling.!distributed-process-client-serverReject the message we're currently handling, giving an explicit reason.!distributed-process-client-server;Instructs the process to send a reply and continue running.!distributed-process-client-server&Instructs the process to send a reply and evaluate the z.!distributed-process-client-server.Instructs the process to skip sending a reply and evaluate a z!distributed-process-client-serverHalt process execution during a call handler, without paying any attention to the expected return type.!distributed-process-client-serverInstructs the process to continue running and receiving messages.!distributed-process-client-server?Instructs the process loop to wait for incoming messages until  is exceeded. If no messages are handled during this period, the timeout handler will be called. Note that this alters the process timeout permanently such that the given Delay" will remain in use until changed. Note that timeoutAfter NoDelay will cause the timeout handler to execute immediately if no messages are present in the process' mailbox.!distributed-process-client-serverInstructs the process to  hibernate for the given . Note that no messages will be removed from the mailbox until after hibernation has ceased. This is equivalent to calling  threadDelay.!distributed-process-client-server2The server loop will execute against the supplied , allowing the process to change its behaviour (in terms of message handlers, exit handling, termination, unhandled message policy, etc)!distributed-process-client-serverInstructs the process to terminate, giving the supplied reason. If a valid shutdownHandler* is installed, it will be called with the 8 returned from this call, along with the process state.&& (c) Tim Watson 2012 - 2017BSD3 (see the file LICENSE)%Tim Watson  experimental#non-portable (requires concurrency) Safe-Inferredt !distributed-process-client-server Starts the message handling loop for a managed process configured with the supplied process definition, after calling the init handler with its initial arguments. Note that this function does not return until the server exits.!distributed-process-client-server Starts the message handling loop for a prioritised managed process, configured with the supplied process definition, after calling the init handler with its initial arguments. Note that this function does not return until the server exits.!distributed-process-client-server Starts the message handling loop1 for a managed process, configured with a typed control channel. The caller supplied expression is evaluated with an opaque reference to the channel, which must be passed when calling handleControlChan. The meaning and behaviour of the init handler and initial arguments are the same as those given to . Note that this function does not return until the server exits.!distributed-process-client-server Wraps any  process loop and ensures that it adheres to the managed process start/stop semantics, i.e., evaluating the  InitHandler. with an initial state and delay will either die due to InitStop, exit silently (due to  InitIgnore) or evaluate the process' loop. The supplied loop must evaluate to  ExitNormal(, otherwise the calling processing will die with whatever  ExitReason is given.!distributed-process-client-server A default 2, with no api, info or exit handler. The default  simply continues, the  is a no-op and the  is  Terminate.!distributed-process-client-serverTurns a standard  into a "%, by virtue of the supplied list of + expressions.!distributed-process-client-serverSets the default recvTimeoutPolicy!, which gives up after 10k reads.!distributed-process-client-serverCreates a default " from a list of +. See  for the underlying definition.!distributed-process-client-serverA basic, stateless . See  for the default field values.!distributed-process-client-serverA default, state unaware c that can be used with . This simply returns InitOk2 with the empty state (i.e., unit) and the given .c"#$%&'()*0+barnzmvlkgjihfed !opq^[ULc"#$%&'()*0+barnzmvlkgjihfed !opq^[UL (c) Tim Watson 2012 - 2017BSD3 (see the file LICENSE)%Tim Watson  experimental#non-portable (requires concurrency) Safe-Inferred !distributed-process-client-serverSend a control message over a [. This version of shutdown uses unsafe primitives.!distributed-process-client-serverSend a signal instructing the process to terminate. This version of shutdown uses unsafe primitives.!distributed-process-client-serverMake a synchronous call - uses unsafe primitives.!distributed-process-client-serverSafe version of  that returns information about the error if the operation fails - uses unsafe primitives.!distributed-process-client-server Version of  that returns  if the operation fails. Uses unsafe primitives.!distributed-process-client-server0Make a synchronous call, but timeout and return Nothing if a reply is not received within the specified time interval - uses unsafe primitives.!distributed-process-client-server Block for  TimeInterval waiting for any matching  CallResponse!distributed-process-client-serverInvokes   out of band', and returns an "async handle." Uses unsafe primitives.!distributed-process-client-serverSends a cast% message to the server identified by server - uses unsafe primitives.!distributed-process-client-serverSends a channel% message to the server and returns a  ReceivePort - uses unsafe primitives.!distributed-process-client-serverA synchronous version of .!distributed-process-client-serverA safe version of , which returns Left ExitReason if the call fails.     !"#$%&'()*+,--./0123456789::;<=>?@AABCCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abbcddefghijklmnopqrstuvwwxyzz{|}~xr                                distributed-process-client-server-0.2.7.0-J8jFpPKNrsjKtWieo0rAq30Control.Distributed.Process.ManagedProcess.Timer9Control.Distributed.Process.ManagedProcess.Internal.Types1Control.Distributed.Process.ManagedProcess.ServerControl.Distributed.Process.ManagedProcess.Internal.GenProcess:Control.Distributed.Process.ManagedProcess.Server.Priority5Control.Distributed.Process.ManagedProcess.Server.Gen*Control.Distributed.Process.ManagedProcess7Control.Distributed.Process.ManagedProcess.UnsafeClient!distributed-process-client-serverControl.Distributed.Process.ManagedProcess.Internal.PriorityQueueTimer timerDelayTimedOutYieldTimerKeyisActive delayTimer startTimer stopTimer resetTimer clearTimer matchTimeoutmatchKeymatchRun readTimer$fBinaryTimedOut $fEqTimedOut$fShowTimedOut$fGenericTimedOutProcessDefinition apiHandlers infoHandlersexternHandlers exitHandlerstimeoutHandlershutdownHandlerunhandledMessagePolicyUnhandledMessagePolicy Terminate DeadLetterLogDropPrioritisedProcessDefinition processDef prioritiesfilters recvTimeoutRecvTimeoutPolicyRecvMaxBacklog RecvTimerDispatchPriorityPrioritiseCallPrioritiseCastPrioritiseInfo prioritisePrioritygetPrio ExternMatcher matchExternmatchMapExternMessageMatcher matchDispatchExitSignalDispatcher dispatchExitDeferredDispatcher dispatchInfoExternDispatcher DispatchCC DispatchSTMchannel dispatchChan stmAction dispatchStmmatchStm matchAnyStm DispatcherDispatch DispatchIfdispatch dispatchIfDispatchFilter FilterApi FilterAny FilterRaw FilterState apiFilter anyFilter rawFilter stateFilterFilterFilterOk FilterSafe FilterReject FilterSkip FilterStop ControlPortunPortControlChannel unControlTimeoutHandlerShutdownHandler InitHandlerStatelessChannelHandlerChannelHandler InfoHandler CastHandlerStatelessCallHandlerDeferredCallHandlerStatelessHandler CallHandler ActionHandlerReplyAction ExitState CleanShutdown LastKnown ConditionStateInput ProcessReply ProcessRejectNoReply ProcessAction ProcessSkipProcessActivityProcessExpressionProcessContinueProcessTimeoutProcessHibernate ProcessStopProcessStopping ProcessBecome GenProcess ProcessState timeoutSpecprocDefprocPrio procFilters usrTimeout sysTimeout usrTimers internalQ procStateQueueLimit InitResultInitOkInitStop InitIgnore CallRejected CallResponseMessage CastMessage CallMessage ChanMessageCallRefunCallerCallId recipienttagmakeRefcallerrejectToCaller runProcessliftliftIOisCleanShutdown exitStatenewControlChanchannelControlPortinitCallunsafeInitCall waitResponse$fRoutableCallRef$fResolvableCallRef$fNFDataCallRef$fBinaryCallRef$fNFDataMessage$fBinaryMessage$fNFDataCallResponse$fBinaryCallResponse$fNFDataCallRejected$fBinaryCallRejected$fEqControlPort$fExternMatcherExternDispatcher$fMonadMaskGenProcess$fMonadCatchGenProcess$fMonadThrowGenProcess $fMessageMatcherExternDispatcher$fMessageMatcherDispatcher$fFunctorGenProcess$fMonadGenProcess$fMonadStateIORefGenProcess$fMonadIOGenProcess$fMonadFixGenProcess$fApplicativeGenProcess$fShowUnhandledMessagePolicy$fEqUnhandledMessagePolicy$fShowControlPort$fGenericCallRejected$fShowCallRejected$fEqCallRejected$fGenericCallResponse$fGenericMessage $fEqCallRef $fShowCallRef$fGenericCallRef$fBinaryControlPort$fShowCallResponse$fEqCallResponse $fShowMessage $fEqMessage conditionstateinputreject rejectWithreply replyWithnoReplynoReply_ haltNoReply_continue continue_ timeoutAfter timeoutAfter_ hibernate hibernate_becomestopstopWithstop_replyTo replyChan handleCall_ handleCallIf_ handleCall handleCallIfhandleCallFrom_handleCallFromIf_handleCallFromhandleCallFromIf handleRpcChanhandleRpcChanIfhandleRpcChan_handleRpcChanIf_ handleCast handleCastIfhandleExternalhandleExternal_handleCallExternalhandleControlChanhandleControlChan_ handleCast_ handleCastIf_actionhandleDispatchhandleDispatchIf handleInfo handleRaw handleExit handleExitIfRestrictedActionRestrictedContinueRestrictedTimeoutRestrictedHibernateRestrictedStopResultTimeout HibernateStopRestrictedProcesssaygetStateputState modifyState haltNoReply handleTimeout$fFunctorRestrictedProcess$fMonadRestrictedProcess$fMonadStatesRestrictedProcess$fMonadIORestrictedProcess$fApplicativeRestrictedProcesssendControlMessageshutdowncallsafeCalltryCall callTimeoutflushPendingCalls callAsynccastcallChan syncCallChansyncSafeCallChancallSTMgetsgetAndModifyStatesetProcessStatesetUserTimeout addUserTimerremoveUserTimerprocessDefinitionprocessFilters processStateprocessUnhandledMsgPolicy processQueue systemTimeout drainTimeoutcurrentTimeout evalAfteractevalrunAfterdequeuepeekpushenqueue precvLooprecvLoop%$fDynMessageHandlerDeferredDispatcher#$fDynMessageHandlerExternDispatcher$fDynMessageHandlerDispatcher $fDynFilterHandlerDispatchFiltercheckrawraw_apiapi_infoinfo_apiSafesafesafelycrash rejectApistorestoreMrefuseensureensureM setPriorityprioritiseCall_prioritiseCallprioritiseCast_prioritiseCastprioritiseInfo_prioritiseInfo$fShowRejectedByServerservepserve chanServedefaultProcess prioritiseddefaultProcessWithPrioritiesstatelessProcess statelessInit PriorityQqemptyisEmpty singletontoList0distributed-process-0.7.7-3onDl8SKCkfI51E1HTsz2E*Control.Distributed.Process.Internal.Spawnbase GHC.MaybeNothingTimerMapghc-prim GHC.TypesBool7distributed-process-extras-0.3.7-B8Ni5YzBvyF7Bf3ElhtYRZ'Control.Distributed.Process.Extras.TimeDelay TimeInterval1Control.Distributed.Process.Extras.Internal.Types ExitReason*Control.Distributed.Process.Internal.TypesSendPortProcess Data.TypeableShutdown3Control.Distributed.Process.Extras.UnsafePrimitivessendDynFilterHandlerDynMessageHandlersetDrainTimeout consumeTimerprocessPriorities timeoutPolicy updateQueueenqueueMessage FilterHandler HandlePure HandleApi HandleRaw HandleSafeRejectedByServerdefaultRecvTimeoutPolicy