\      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGH I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~  A Maybe-like poison wrapper. &ClockSync was added in version 1.2.0.  search is notC used for discovering offers. It is used for looking for possible U resolutions to a collection of offer sets. It is pure; it performs no STM actions, O it just searches the offer-sets (which will have been discovered through STM)  for completions. Nsearch performs a 2-dimensional traversal of the offers. The search function O is called with a list of offer-sets. For the offer-set at the head, it calls P tryAll. tryAll searches through each offer in the offer-set, seeing if it can Q be completed. If it can, it calls search on the remaining offer-sets. If this \ fails, it reverts to trying the other offers in the list. The map of events passed through 5 relates to the previous things found in the search. KGiven the variable used to signal the process, and the list of events that O were involved in its offers, attempts to disable the events. If the variable c has been signalled (i.e. has a Just value), that is returned and nothing is done, if the variable O has not been signalled (i.e. is Nothing), the events are disabled and Nothing  is returned. DAn individual record of an event, found in nested traces. Either a I channel write or read, or a barrier synchronisation, each with a unique  identifier for the barrier/(channel. The event will be recorded by B everyone involved, and a ChannelWrite will have the same channel H identifier as the corresponding channel-read. The identifiers are per  channel/>barrier, not per event. Currently, channels and barriers can C never have the same Unique as each other, but do not rely on this  behaviour. +ClockSyncIndiv was added in version 1.2.0. \The type became parameterised, and the Show and Read instances were added in version 1.3.0. BA globally recorded event, found in CSP and VCR traces. Either a F channel communication (with a unique identifier of the channel) or a I barrier synchronisation (with a unique identifier of the barrier). The  identifiers are per channel/$barrier, not per event. Currently, I channels and barriers can never have the same Unique as each other, but  do not rely on this behaviour. 0The type became parameterised in version 1.3.0. Added in version 1.3.0. Added in version 1.3.0. GRecords an event where you were the last person to engage in the event ;Records an event where you were one of the people involved )      )          1A class indicating that something is poisonable. Poisons the given item. DChecks if the given item is poisoned. If it is, a poison exception  will be thrown. Added in version 1.0.2. CA class representing a type of trace. The main useful function is , J but because its type is only determined by its return type, you may wish L to use the already-typed functions offered in each trace module -- see the  modules in Control.Concurrent.CHP.Traces. ?The trace type involved became parameterised in version 1.3.0. HRuns the given CHP program, and returns its return value and the trace. G The return value is a Maybe type because the process may have exited H due to uncaught poison. In that case Nothing is return as the result. The empty trace. (Pretty-prints the given trace using the Text.PrettyPrint.HughesPJ  module. Added in version 1.3.0. 2A monad transformer class that is very similar to . This can be 7 useful if you want to add monad transformers (such as  !, "#) on  top of the  monad. /The central monad of the library. You can use  #Control.Concurrent.CHP.Monad.runCHP and  $Control.Concurrent.CHP.Monad.runCHP_ to execute programs in this  monad. FAn enrolled wrapper for barriers that shows at the type-level whether J you are enrolled on a barrier. Enrolled Barriers should never be passed N to two (or more) processes running in parallel; if two processes synchronise A based on a single enroll call, undefined behaviour will result. $)An internal dummy type for poison errors %NChecks for poison, and either returns the value, or throws a poison exception Throws a poison exception. IAllows you to provide a handler for sections with poison. It is usually # used in an infix form as follows:  J (readChannel c >>= writeChannel d) `onPoisonTrap` (poison c >> poison d) CIt handles the poison and does not rethrow it (unless your handler 5 does so). If you want to rethrow (and actually, you'll find you usually  do), use  Like 0, this function allows you to provide a handler E for poison. The difference with this function is that even if the E poison handler does not throw, the poison exception will always be G re-thrown after the handler anyway. That is, the following lines of % code all have identical behaviour:  foo # foo `onPoisonRethrow` throwPoison ! foo `onPoisonRethrow` return () 3Poisons all the given items. A handy shortcut for  mapM_ poison. $ &'()*+,$-./012%34567$ &*'()'()*++,,$--./012%34567AA VCR (View-Centric Reasoning) trace. It is the channel labels, G accompanied by a sequential list of sets of recorded events. Each of F the sets is a set of independent events. The set at the head of the & list is the first-recorded (oldest). /The type became parameterised in version 1.3.0    !,A trace type that does not record anything. !!!"LA nested (or hierarchical) trace. The trace is an event hierarchy, wrapped K in a Maybe type to allow for representation of the empty trace (Nothing). $UA data type representing a hierarchy of events. The count on the StructuralSequence @ count is a replicator count for that list of sequential items. PThe Show, Read, Foldable and Traversable instances were added in version 1.3.0. (TFlattens the events into a list. The resulting list may contain duplicates, and it I should not be assumed that the order relates in any way to the original  hierarchy. "#$%&'()* "#$'&%)*( "##$'&%%&'()*+NA classic CSP trace. It is simply the channel labels, and a list of recorded I events in sequence -- the head of the list is the first (oldest) event. +,-.+,-.+,,-.$  !"#$%&'()*+,-.   /9A monad transformer used for introducing forking blocks. 0IThis type-class supports parallel composition of processes. You may use  the 0- function to run a list of processes, or the 1 operator " to run just a pair of processes. HIn each case, the composition waits for all processes to finish, either 6 successfully or with poison. At the end of this, if any process * exited with poison, the composition will "rethrow" this poison. If all I the processes completed successfully, the results will be returned. If G you want to ignore poison from the sub-processes, use an empty poison  handler and  with each branch. FRuns the given list of processes in parallel, and then returns a list M of the results, in the same order as the processes given. Will only return . when all the inner processes have completed. 1=A useful operator for performing a two process equivalent of 0 L that gives the return values back as a pair rather than a list. This also + allows the values to have different types 2An operator similar to 11 that discards the output (more like an operator  version of 3). Added in version 1.1.0. 3HRuns all the given processes in parallel and discards any output. Does 5 not return until all the processes have completed. 3 ps is effectively equivalent  to 0 ps >> return (). 8GRuns all the processes in parallel and returns their results once they I have all finished. The length and ordering of the results reflects the " length and ordering of the input 4IExecutes a forking block. Processes may be forked off inside (using the  5C function). When the block completes, it waits for all the forked K off processes to complete before returning the output, as long as none of I the processes terminated with uncaught poison. If they did, the poison  is propagated (rethrown). 5JForks off the given process. The process then runs in parallel with this  code, until the end of the 4& block, when all forked-off processes J are waited for. At that point, once all of the processes have finished, / if any of them threw poison it is propagated. /0123450312/45/012345 6DA monad transformer for easier looping. This is independent of the H CHP aspects, but has all the right type-classes defined for it to make & it easy to use with the CHP library. 7HRuns a CHP program. You should use this once, at the top-level of your J program. Do not ever use this function twice in parallel and attempt to Q communicate between those processes using channels. Instead, run this function D once and use it to spawn off the parallel processes that you need. 8Runs a CHP program. Like 7 but discards the output. 9HAllows embedding of the CHP monad back into the IO monad. The argument K that this function takes is a CHP action (with arbitrary behaviour). The A function is monadic, and returns something of type: IO a. This I is an IO action that you can now use in the IO monad wherever you like. 8 What it returns is the result of your original action. MThis function is intended for use wherever you need to supply an IO callback S (for example with the OpenGL libraries) that needs to perform CHP communications. R It is the safe way to do things, rather than using runCHP twice (and also works 9 with CSP and VCR traces -- but not structural traces!). :9A convenient version of embedCHP that ignores the result ;;A helper like embedCHP for callbacks that take an argument <:A convenient version of embedCHP1 that ignores the result =ARuns the given action in a loop, executing it repeatedly until a > 8 statement inside it has a False condition. If you use = without >,  the effect is the same as 9 . >GContinues executing the loop if the given value is True. If the value I is False, the loop is broken immediately, and control jumps back to the  next action after the outer =/ statement. Thus you can build pre-condition,  post-condition, and " mid-condition"' loops, placing the condition wherever  you like. ?IWaits for the specified number of microseconds (millionths of a second). L There is no guaranteed precision, but the wait will never complete in less  time than the parameter given. Suitable for use in an Control.Concurrent.CHP.Alt.alt, but note that ? 0 is not the same  as @. ? 0 Control.Concurrent.CHP.Alt.</>+ x will not always select the first guard, A depending on x. Included in this is the lack of guarantee that  ? 0 Control.Concurrent.CHP.Alt.</> ?- n will select the first guard for any value 2 of n (including 0). It is not useful to use two ? guards in a  single Control.Concurrent.CHP.Alt.alt anyway. NOTE:; If you wish to use this as part of a choice, you must use  -threaded 5 as a GHC compilation option (at least under 6.8.2). @The classic skip process/+guard. Does nothing, and is always ready. Suitable for use in an Control.Concurrent.CHP.Alt.alt. AHThe stop guard. Its main use is that it is never ready in a choice, so : can be used to mask out guards. If you actually execute A, that process K will do nothing more. Any parent process waiting for it to complete will  wait forever.  6789:;<=>?@A789:;< 6=>@A? 6789:;<=>?@ACHEnrolls on the given barrier, then executes the given function (passing K it in the enrolled barrier) and when that function body finishes, resigns Q from the barrier and returns the result. If a poison or IO exception is thrown G in the inside block, the barrier will be correctly resigned from, and  the exception rethrown. Do not attempt to return the C enrolled barrier out of the inner function and use it afterwards. DEResigns from a barrier, then executes the given action, and when the J action finishes, re-enrolls on the barrier and continues. This function  is designed for use from inside the body of the C function, to H temporarily resign from a barrier, do some things, then re-enroll. Do I not use the enrolled barrier inside the resign block. However, you may H enroll on the barrier inside this, nesting enroll and resign blocks as  much as you like EHJust like enroll, but starts with an already enrolled item. During the M body, you are enrolled twice -- once from the original enrolled item (which K is still valid in the body) and once from the new enrolled item passed to N the inner function. Afterwards, you are enrolled once, on the original item  you had. *This function was added in version 1.3.2. FLike C+ but enrolls on the given pair of barriers GLike C+ but enrolls on the given list of barriers BCDEFGBCDEFGBCDCDEFG HDAn alt between several actions, with arbitrary priority. The first J available action is chosen (with an arbitrary choice if many actions are D available at the same time), its body run, and its value returned. IEAn alt between several actions, with descending priority. The first J available action is chosen (biased towards actions nearest the beginning 5 of the list), its body run, and its value returned. MWhat priority means here is a difficult thing, and in some ways a historical ; artifact. We can group the guards into three categories: S1. synchronisation guards (reading from and writing to channels, and synchronising  on barriers) 2. time-out guards (such as ?) 3. dummy guards (@ and A) LThere exists priority when comparing dummy guards to anything else. So for  example,   priAlt [ skip, x ] -Will always select the first guard, whereas:   priAlt [ x , skip ] AIs an effective way to poll and see if x is ready, otherwise the @ will N be chosen. However, there is no priority between synchronisation guards and % time-out guards. So the two lines:   priAlt [ x, y ]  priAlt [ y, x ] NMay have the same or different behaviour (when x and y are not dummy guards), N there is no guarantee either way. The reason behind this is that if you ask  for:  , priAlt [ readChannel c, writeChannel d 6 ] 0And the process at the other end is asking for:  , priAlt [ readChannel d, writeChannel c 8 ] LWhichever channel is chosen by both processes will not satisfy the priority ? at one end (if such priority between channels was supported). J A useful operator to perform an H !. This operator is associative, R and has arbitrary priority. When you have lots of guards, it is probably easier  to use the H  function. H  may be more efficent than  foldl1 (<->) KA useful operator to perform a I . This operator is : associative, and has descending priority (that is, it is E left-biased). When you have lots of actions, it is probably easier  to use the I  function. I  may be more efficent than  foldl1 (</>) LLRuns all the given processes in parallel with each other, but only when the 0 choice at the beginning of each item is ready. So for example, if you do:  M every [ readChannel c >>= writeChannel d, readChannel e >>= writeChannel f] OThis will forward values from c and e to d and f respectively in parallel, but T only once both channels c and e are ready to be read from. So f cannot be written C to before c is read from (contrast this with what would happen if L  were  replaced with 0). +This behaviour can be somewhat useful, but L  is much more powerful when  used as part of an H . This code:  - alt [ every [ readChannel c, readChannel d] 5 , every [ writeChannel e 6, writeChannel f 8] ] MWaits to either read from channels c and d, or to write to channels e and f. 0The events involved can partially overlap, e.g.  - alt [ every [ readChannel a, readChannel b] 2 , every [ readChannel a, writeChannel c 6] ] QThis will wait to either read from channels a and b, or to read from a and write T to c, whichever combination is ready first. If both are ready, the choice between = them will be arbitrary (just as with any other choices; see H  for more details). 5The sets can even be subsets of each other, such as:  - alt [ every [ readChannel a, readChannel b] > , every [ readChannel a, readChannel b, readChannel b] ] MIn this case there are no guarantees as to which choice will happen. Do not K assume it will be the smaller, and do not assume it will be the larger. QBe wary of what happens if a single event is included multiple times in the same L , as F this may not do what you expect (with or without choice). Consider:  + every [ readChannel c >> writeChannel d 6 - , readChannel c >> writeChannel d 8 ] NWhat will happen is that the excecution will wait to read from c, but then it P will execute only one of the bodies (an arbitrary choice). In general, do not O rely on this behaviour, and instead try to avoid having the same events in an  L >. Also note that if you synchronise on a barrier twice in an L , M this will only count as one member enrolling, even if you have two enrolled  ends! For such a use, look at 0 instead. IAlso note that this currently applies to both ends of channels, so that:  + every [ readChannel c, writeChannel c 2 ] CWill block indefinitely, rather than completing the communication.  Each item L " must support choice (and in fact ) only a subset of the items supported by H  are supported by L ). Currently the items  in the list passed to L  must be one of the following:  A call to +Control.Concurrent.CHP.Channels.readChannel (or .Control.Concurrent.CHP.Channels.extReadChannel).  A call to ,Control.Concurrent.CHP.Channels.writeChannel (or /Control.Concurrent.CHP.Channels.extWriteChannel).  @, the always-ready guard.  A., the never-ready guard (will cause the whole L  to never be ready,  since L  has to wait for all guards).  A call to (Control.Concurrent.CHP.Monad.syncBarrier. L A sequential composition where the first item is one of the things in this  list.  A call to L  (you can nest L  blocks inside each other). Timeouts (e.g. ?;) are currently not supported. You can always get another M process to synchronise on an event with you once a certain time has passed. !Note also that you cannot put an H  inside an L . So you cannot say:   every [ readChannel c 0 , alt [ readChannel d, readChannel e ] ] NTo wait for c and (d or e) like this you must expand it out into (c and d) or  (c and e):  - alt [ every [ readChannel c, readChannel d] / , every [ readChannel c, readChannel e] ] 2As long as x meets the conditions laid out above, L  [x] will have the same  behaviour as x. Added in version 1.1.0 M!A useful operator that acts like L #. The operator is associative and  commutative (see L : for notes on idempotence). When you have lots of things  to join with this operator, it's probably easier to use the L  function. Added in version 1.1.0 HIJKLMHJIKLMHIJKLM!NHA wrapper (usually around a channel-end) indicating that the inner item  is shared. Use the claim function to use this type. ODA channel type, that can be used to get the ends of the channel via Q   and R  PGets the channel'9s identifier. Useful if you need to be able to identify " a channel in the trace later on. Q+Gets the reading end of a channel from its O  type. R+Gets the writing end of a channel from its O  type. SHA phased barrier that is capable of being poisoned and throwing poison. ? You will need to enroll on it to do anything useful with it. 4 For the phases you can use any type that satisfies :", ;" and <#. P The phase increments every time the barrier completes. Incrementing consists  of: *if p == maxBound then minBound else succ p. Examples of things that  make sense for phases:  The () type (see the =1 type). This effectively has a single repeating , phase, and acts like a non-phased barrier. V A bounded integer type. This increments the count every time the barrier completes.  But don'At forget that the count will wrap round when it reaches the end.  You cannot use >$%5 for a phase because it is unbounded. If you really ; want to have an infinitely increasing count, you can wrap >$% in a newtype and  provide a ;"8 instance for it (with minBound and maxBound set to -1,  if you start on 0). K A boolean. This implements a simple black-white barrier, where the state  flips on each iteration. > A custom data type that has only constructors. For example, data MyPhases  = Discover | Plan | Move. Haskell supports deriving :", ;" and  <# automatically on such types. ?OSynchronises on the given barrier. You must be enrolled on a barrier in order N to synchronise on it. Returns the new phase, following the synchronisation. N@OAPQRS=BC? N@@OAPQRAPQRS==BC? T;A useful type synonym for enrolled barriers with no phases Added in 1.1.0 UFA special case of the PhasedBarrier that has no useful phases, i.e. a  standard barrier. VOSynchronises on the given barrier. You must be enrolled on a barrier in order N to synchronise on it. Returns the new phase, following the synchronisation. W-Finds out the current phase a barrier is on. XFIf the barrier is not in the given phase, synchronises on the barrier  repeatedly until it is in the given phase. Y1Creates a new barrier with no processes enrolled ZFCreates a new barrier with no processes enrolled, that will be on the K given phase. You will often want to pass in the last value in your phase C cycle, so that the first synchronisation moves it on to the first [FCreates a new barrier with no processes enrolled, that will be on the V given phase, along with a custom function to increment the phase. You can therefore X use this function with Integer as the inner type (and succ or (+1) as the incrementing V function) to get a barrier that never cycles. You can also do things like supplying M (+2) as the incrementing function, or even using lists as the phase type to  do crazy things. \ICreates a new barrier with no processes enrolled and labels it in traces  using the given label. See Y . ]ICreates a new barrier with no processes enrolled and labels it in traces  using the given label. See Z . ^ICreates a new barrier with no processes enrolled and labels it in traces  using the given label. See [ . _HGets the identifier of a Barrier. Useful if you want to identify it in  the trace later on. STUVWXYZ[\]^_ UTY\SZ][^WXV_ TUVWXYZ[\]^_ `JA clock that measures time using the given type. Only Ord is required on Q the type, so it can be all sorts. Obvious possibilities are numeric types such E as Int and Double -- if you want monotonically-increasing time, see d . Q Other possibilities include your own algebraic types, if you want a clock that N cycles around a given set of phases. If every process enrolled on the clock G always just waits for the next time, you may want to consider using a S . N If you want a clock that works in reverse or anything else strange, you can C always wrap your type in a newtype to give a custom Ord instance. NSee the documentation at the beginning of this module for more information on  clocks. a;A type-class for things that you can on for a specific time/ phase. The  instance for S . repeatedly syncs until the specific phase is 2 reached. Clock waits until the time is reached. b3Given an enrolled item, waits for the specific time/ phase (if 2 you pass a Just value) or the next available time/phase. (if you H pass Nothing). The value returned is the new current time. Note that  waiting for the current time/phase or a past time/ phase on a  clock/ barrier will not0 return immediately -- see the rules at the top  of this module, and see d . cGets the current time/phase. dONormally, when waiting on a clock, if you wait for a time equal to (or earlier R than) the current time, you will block until the clock wraps around. Sometimes, O however, you may want your clock to never wrap around (and use Integer as the M inner type, usually), and want to make sure that if a process waits for the V current time or earlier, it returns instantly. That is what this function achieves. GCalling this function with Nothing has indentical behaviour to calling b  N with Nothing. If you wait for the current time or earlier, all of the other O processes waiting on the clock will remain blocked. Processes who have asked P to wait for the current time will remain blocked -- it is generally not useful  to mix d  and b  on the same clock. eLCreates a clock that starts at the given time. The Show instance is needed  to display times in traces. fFCreates a clock that starts at the given time, and gives it the given K label in traces. The Show instance is needed to display times in traces. `abcdef`abcdef`abcbcdef gFA helper class for easily creating several channels of the same type. F The same type refers not only to what type the channel carries, but E also to the type of channel (one-to-one no poison, one-to-any with / poison, etc). You can write code like this:   (a, b, c, d, e) <- newChannels *To create five channels of the same type. i5A class indicating that a channel can be written to. j*Writes from the given writing channel-end kHStarts the communication, then performs the given extended action, then + sends the result of that down the channel l4A class indicating that a channel can be read from. m)Reads from the given reading channel-end nHPerforms an extended read from the channel, performing the given action  before freeing the writer oFA class used for allocating new channels, and getting the reading and I writing ends. There is a bijective assocation between the channel, and O its pair of end types. You can see the types in the list of instances below.  Thus, p 8 may be used, and the compiler will infer which type of : channel is required based on what end-types you get from Q  and R . 5 Alternatively, if you explicitly type the return of p  , it will I be definite which ends you will use. If you do want to fix the type of K the channel you are using when you allocate it, consider using one of the  many  --like shorthand functions that fix the type. p2Allocates a new channel. Nothing need be done to  destroy/5de-allocate the channel when it is no longer in use. u;A writing channel-end type that allows poison to be thrown #Eq instance added in version 1.1.1 v;A reading channel-end type that allows poison to be thrown #Eq instance added in version 1.1.1 wEA helper function that uses the parallel strategies library (see the  paper: ""Algorithm + Strategy = Parallelism", P.W. Trinder et al, JFP  8(1) 1998,   Hhttp://www.macs.hw.ac.uk/~dsg/gph/papers/html/Strategies/strategies.html) G to make sure that the value sent down a channel is strictly evaluated $ by the sender before transmission. JThis is useful when you want to write worker processes that evaluate data  and send it back to some " harvester"& process. By default the values sent T back may be unevaluated, and thus the harvester might end up doing the evaluation. O If you use this function, the value is guaranteed to be completely evaluated  before sending. Added in version 1.0.2. xLike p 4 but also associates a label with that channel in a H trace. You can use this function whether tracing is turned on or not, = so if you ever use tracing, you should use this rather than p . yA helper that is like p % but returns the reading and writing  end of the channels directly. zA helper that is like p % but returns the writing and reading  end of the channels directly. {GCreates a list of channels of the same type with the given length. If J you need to access some channels by index, use this function. Otherwise  you may find using h  to be easier. |A helper that is like { $, but labels the channels according L to a pattern. Given a stem such as foo, it names the channels in the list  foo0, foo1, foo2, etc. }A helper that is like { #, but labels the channels with the K given list. The number of channels returned is the same as the length of  the list of labels ~BGets all the reading ends of a list of channels. A shorthand for map  reader. BGets all the writing ends of a list of channels. A shorthand for map  writer. *A type-constrained version of newChannel. 3A type-constrained version of newChannelWithLabel. Added in version 1.2.0. FClaims the given channel-end, executes the given block, then releases C the channel-end and returns the output value. If poison or an IO G exception is thrown inside the block, the channel is released and the  poison/exception re-thrown. *A type-constrained version of newChannel. *A type-constrained version of newChannel. *A type-constrained version of newChannel. 3A type-constrained version of newChannelWithLabel. Added in version 1.2.0. 3A type-constrained version of newChannelWithLabel. Added in version 1.2.0. 3A type-constrained version of newChannelWithLabel. Added in version 1.2.0. 'NOPQRghijklmnopqrstuvwxyz{|}~*OPQRopwxzygh{}|PvuQR~lmnijkNtrsq"ghhijkjklmnmnoppqrstuvwxyz{|}~ CThe writing end of a reduce channel. You must enroll on it before $ you can read from it or poison it. %The reading end of a reduce channel. (The writing end of a broadcast channel. FThe reading end of a broadcast channel. You must enroll on it before $ you can read from it or poison it. Added in version 1.2.0. Added in version 1.2.0. &u /0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ A receive action. See . Note that it is poisonable. A send action. See . Note that it is poisonable. JSends a data item using the given sendAction. Whether this operation can  be used in a choice (see H 0) is entirely dependent on whether the original 0 action could be used in an alt. For all of CHP's channels, this is true, but 1 for your own custom send actions, probably not. MReceives a data item using the given recvAction. Whether this operation can  be used in a choice (see H 0) is entirely dependent on whether the original 0 action could be used in an alt. For all of CHP's channels, this is true, but 4 for your own custom receive actions, probably not. :Given a writing channel end, gives back the corresponding . Like 7, but always applies the given function before sending  the item. :Given a reading channel end, gives back the corresponding . Like 8, but always applies the given function after receiving  an item. OCreates a custom send operation. The first parameter should perform the send, N the second parameter should poison your communication channel, and the third O parameter should check whether the communication channel is already poisoned. " Generally, you will want to use  instead of this function. UCreates a custom receive operation. The first parameter should perform the receive, N the second parameter should poison your communication channel, and the third O parameter should check whether the communication channel is already poisoned. " Generally, you will want to use  instead of this function. 4Acts like a SendAction, but just discards the data. CActs like a RecvAction, but always gives back the given data item. LForever forwards the value onwards, unchanged. Adding this to your process 1 network effectively adds a single-place buffer. -Forever forwards the value onwards. This is  like B but does not add any buffering to your network, and its presence - is indetectable to the process either side. ,extId is a unit of the associative operator !Control.Concurrent.CHP.Utils.|->|. NThe behaviour of this process was corrected in version 1.1.0 to work properly < when the reader of its output channel was offering choice. 8A process that waits for an input, then sends it out on all its output T channels (in order) during an extended rendezvous. This is often used to send the L output on to both the normal recipient (without introducing buffering) and N also to a listener process that wants to examine the value. If the listener L process is first in the list, and does not take the input immediately, the I value will not be sent to the other recipients until it does. The name J of the process derives from the notion of a wire-tap, since the listener N is hidden from the other processes (it does not visibly change the semantics M for them -- except when the readers of the channels are offering a choice). BSends out a single value first (the prefix) then behaves like id. BForever reads in a value, and then sends out its successor (using D"). GReads in a value, and sends it out in parallel on all the given output  channels. OForever reads in a value, transforms it using the given function, and sends it I out again. Note that the transformation is not applied strictly, so don't I assume that this process will actually perform the computation. If you & require a strict transformation, use . Like <, but applies the transformation strictly before sending on  the value. Added in version 1.1.0. HForever reads in a value, and then based on applying the given function G either discards it (if the function returns False) or sends it on (if  the function returns True). Streams all items in a Data.Traversable.Traversable container out  in the order given by Data.Traversable.mapM on the output channel (one at  a time). Lists, E', and  Data.Set.Set are all instances  of Data.Traversable.Traversable!, so this can be used for all of  those. CForever waits for input from one of its many channels and sends it " out again on the output channel. HSends out the specified value on the given channel the specified number  of times, then finishes. GForever sends out the same value on the given channel, until poisoned. @ Similar to the white-hole processes in some other frameworks. IForever reads values from the channel and discards them, until poisoned. @ Similar to the black-hole processes in some other frameworks. LFor the duration of the given process, acts as a consume process, but stops N when the given process stops. Note that there could be a timing issue where F extra inputs are consumed at the end of the lifetime of the process. N Note also that while poison from the given process will be propagated on the U consumption channel, there is no mechanism to propagate poison from the consumption ! channel into the given process. Added in version 1.2.0. KForever reads a value from both its input channels in parallel, then joins Q the two values using the given function and sends them out again. For example,   join (,) c d will pair the values read from c and d and send out the % pair on the output channel, whereas join (&&) will send out the conjunction  of two boolean values,  join (==)) will read two values and output whether  they are equal or not, etc. JForever reads a value from all its input channels in parallel, then joins U the values into a list in the same order as the channels, and sends them out again. HForever reads a pair from its input channel, then in parallel sends out @ the first and second parts of the pair on its output channels. Added in version 1.0.2. .A sorter process. When it receives its first Just x data item, it keeps L it. When it receieves a second, it keeps the lowest of the two, and sends L out the other one. When it receives Nothing, it sends out its data value, Q then sends Nothing too. The overall effect when chaining these things together I is a sorting pump. You inject all the values with Just, then send in a ; single Nothing to get the results out (in reverse order). FLike sorter, but with a custom comparison method. You should pass in  the equivalent of less-than: (<). HA shared variable process. Given an initial value and two channels, it F continually offers to output its current value or read in a new one. Added in version 1.1.1 ONote that prior to version 1.2.0 (i.e. in version 1.1.1) there was a bug where > poison would not be propagated between the input and output. HA shared variable process. The same as valueStore, but initially waits N to read its starting value before then offering to either output its current  value or read in a new one. Added in version 1.1.1 ONote that prior to version 1.2.0 (i.e. in version 1.1.1) there was a bug where > poison would not be propagated between the input and output. MContinually waits for a specific time on the given clock, each time applying O the function to work out the next specific time to wait for. The most common ( thing to pass is Prelude.succ or (+1). Added in version 1.2.0. HActs like a limited capacity FIFO buffer of the given size. When it is E full it accepts no input, and when it is empty it offers no output. IActs like a FIFO buffer with unlimited capacity. Use with caution; make O sure you do not let the buffer grow so large that it eats up all your memory. C When it is empty, it offers no output. It always accepts input. AActs like a FIFO buffer with unlimited capacity, but accumulates M sequential inputs into a list which it offers in a single output. Use with L caution; make sure you do not let the buffer grow so large that it eats up J all your memory. When it is empty, it offers the empty list. It always J accepts input. Once it has sent out a value (or values) it removes them  from its internal storage. Added in version 1.2.0. JActs like a FIFO buffer of limited capacity, except that when it is full, W it always accepts input and discards it. When it is empty, it does not offer output. JActs like a FIFO buffer of limited capacity, except that when it is full, M it always accepts input and pushes out the oldest item in the buffer. When ( it is empty, it does not offer output. IA set of channels to be given to the process to run, containing channels  for stdin, stdout and stderr. JA function for running the given CHP process that wants console channels. N When your program finishes, the console channels are automatically poisoned,  but it'Ds good practice to poison them yourself when you finish. Only ever K run one of these processes at a time, or undefined behaviour will result. RWhen using this process, due to the way that the console handlers are terminated, T you may sometimes see a notice that a thread was killed. This is normal behaviour  (unfortunately). IWires given processes up in a forward cycle. That is, the first process K writes to the second, and receives from the last. It returns the list of N wired-up processes, which you will almost certainly want to run in parallel. GWires the given processes up in a forward pipeline. The first process Q in the list is connected to the given reading channel-end (the first parameter) J and the writing end of a new channel, A. The second process is wired up J to the reading end of A, and the writing end of the next new channel, B. L This proceeds all the way to the end of the list, until the final process I is wired to the reading end of Z (if you have 27 processes in the list, L and therefore 26 channels in the middle of them) and the second parameter. R The list of wired-up processes is returned, which you can then run in parallel. A specialised version of '. Given a list of processes, composes M them into an ordered pipeline, that takes the channel-ends for the sticking K out ends of the pipeline and gives a process that returns a list of their ! results. This is equivalent to , with the return value fed  to 0. Added in version 1.0.2. A specialised version of '. Given a list of processes, composes I them into a cycle and runs them all in parallel. This is equivalent to   with the return value fed into 0. Added in version 1.0.2. JProcess composition. Given two processes, composes them into a pipeline, J like function composition (but with an opposite ordering). The function A is associative. Using wirePipeline will be more efficient than foldl1  (|->|) for more than two processes. AThe type for this process became more specific in version 1.2.0. ,The reversed version of the other operator. AThe type for this process became more specific in version 1.2.0. LA function to use at the start of a pipeline you are chaining together with  the '(|->|)' operator.  Added in version 1.2.0. JA function to use at the end of a pipeline you are chaining together with  the '(|->|)' operator.  Added in version 1.2.0.  The type that is an instance of F( for process pipelines. See . Given a  (formed using its F( instance) and I the channels to plug into the ends of the pipeline, returns the process  representing the pipeline. FThe pipeline will run forever (until poisoned) and you must run it in L parallel to whatever is feeding it the inputs and reading off the outputs. L Imagine that you want a process pipeline that takes in a pair of numbers, F doubles the first and adds one to the second. You could encode this  in an arrow using:  % runPipeline (arr (*2) *** arr (+1)) EArrows are more useful where you already have processes written that M process data and you want to easily wire them together. The arrow notation L is probably easier for doing that than declaring all the channels yourself ' and composing everything in parallel. FAdds a wrapper that forms this process into the right data type to be  part of an arrow. DAny process you apply this to should produce exactly one output per L input, or else you will find odd behaviour resulting (including deadlock).  So for example, don't use arrowProcess ($Control.Concurrent.CHP.Common.filter  ...) or  arrowProcess $Control.Concurrent.CHP.Common.stream Added in version 1.1.0 QLike the arr function of the ProcessPipeline arrow instance, but fully evaluates U the result before sending it. If you are building process pipelines with arrows to M try and get some parallel speed-up, you should try this function instead of  arr itself. Added in version 1.3.2 G)*+,-./0123456789:;<=>?@ABCDEFFGHIJJKLMNOPQRRSTUVWXYZ[\]^_`abcdefghijklm n o p q r s!t!u!v!w!x!y z { | } ~                            !"9#$%&'()*+,-./0123456789:;<=>?@ABCCDDEFGHIJKLAEMNOPQRSTUVW XYZY[\]!{$^_!`!t!u!a!bY'c(de chp-1.3.2Control.Concurrent.CHP.TracesControl.Concurrent.CHP.MonadControl.Concurrent.CHP.Enroll!Control.Concurrent.CHP.Traces.VCR&Control.Concurrent.CHP.Traces.TraceOff(Control.Concurrent.CHP.Traces.Structural!Control.Concurrent.CHP.Traces.CSPControl.Concurrent.CHP.ParallelControl.Concurrent.CHP.AltControl.Concurrent.CHP.ChannelsControl.Concurrent.CHP.BarriersControl.Concurrent.CHP.Clocks(Control.Concurrent.CHP.BroadcastChannelsControl.Concurrent.CHP.ActionsControl.Concurrent.CHP.CommonControl.Concurrent.CHP.BuffersControl.Concurrent.CHP.ConsoleControl.Concurrent.CHP.UtilsControl.Concurrent.CHP.Arrow Control.Concurrent.CHP.ProcessIdControl.Concurrent.CHP.PoisonControl.Concurrent.CHP.MutexControl.Concurrent.CHP.Event"Control.Concurrent.CHP.Traces.BaseControl.Concurrent.CHP.GuardControl.Concurrent.CHP.Base mtl-1.1.0.2Control.Monad.TransControl.Monad.State.LazyControl.Monad.Readerbase Control.MonadControl.Concurrent.CHP.CSPPreludeData.Eqinteger GHC.IntegerControl.Concurrent.CHP Data.Maybe Control.ArrowRecordedEventType ClockSync BarrierSync ChannelComm ChannelLabelsRecordedIndivEventClockSyncIndivBarrierSyncIndiv ChannelRead ChannelWrite RecordedEventrecordedIndivEventLabelrecordedIndivEventSeq PoisonablepoisoncheckForPoisonTracerunCHPAndTrace emptyTrace prettyPrintlabelAllMonadCHPliftCHPCHPEnrolled throwPoison onPoisonTraponPoisonRethrow poisonAllVCRTracerunCHP_VCRTracerunCHP_VCRTraceAndPrintTraceOffStructuralTraceEventHierarchyStructuralParallelStructuralSequence SingleEventgetAllEventsInHierarchyrunCHP_StructuralTracerunCHP_StructuralTraceAndPrintCSPTracerunCHP_CSPTracerunCHP_CSPTraceAndPrintForkingT runParallel<||><|*|> runParallel_forkingfork LoopWhileTrunCHPrunCHP_embedCHP embedCHP_ embedCHP1 embedCHP1_loopwhilewaitForskipstop Enrollableenrollresign furtherEnroll enrollPair enrollListaltpriAlt<->every<&>SharedChangetChannelIdentifierreaderwriter PhasedBarrierEnrolledBarrierBarrier syncBarrier currentPhase waitForPhase newBarriernewPhasedBarriernewPhasedBarrierCustomIncnewBarrierWithLabelnewPhasedBarrierWithLabel"newPhasedBarrierWithLabelCustomIncgetBarrierIdentifierClockWaitablewaitgetCurrentTime waitUnboundednewClocknewClockWithLabel ChannelTuple newChannelsWriteableChannel writeChannelextWriteChannelReadableChannel readChannelextReadChannelChannel newChannelAnyToAnyChannelOneToAnyChannelAnyToOneChannelOneToOneChannelChanoutChaninwriteChannelStrictnewChannelWithLabel newChannelRW newChannelWRnewChannelListnewChannelListWithStemnewChannelListWithLabelsreaderswritersoneToOneChanneloneToOneChannelWithLabelclaimanyToOneChanneloneToAnyChannelanyToAnyChannelanyToOneChannelWithLabeloneToAnyChannelWithLabelanyToAnyChannelWithLabelManyToAnyChannelManyToOneChannel ReduceChanout ReduceChaninAnyToManyChannelOneToManyChannelBroadcastChanoutBroadcastChaninoneToManyChannelanyToManyChanneloneToManyChannelWithLabelanyToManyChannelWithLabelmanyToOneChannelmanyToAnyChannelmanyToOneChannelWithLabelmanyToAnyChannelWithLabel RecvAction SendAction sendAction recvActionmakeSendActionmakeSendAction'makeRecvActionmakeRecvAction'makeCustomSendActionmakeCustomRecvActionnullSendActionnullRecvActionidextIdtapprefixsuccparDeltamapmap'filterstreammerger replicaterepeatconsumeconsumeAlongsidejoinjoinListsplitsortersorter' valueStore valueStore' advanceTime fifoBufferinfiniteBufferaccumulatingInfiniteBufferoverflowingBufferoverwritingBuffer ConsoleChanscStdincStdoutcStderrconsoleProcess wireCycle wirePipelinepipelinecycle|->||<-|->||->ProcessPipeline runPipeline arrowProcess arrStrict ProcessId ProcessIdPartParSeq rootProcessIdemptyProcessId testProcessIdpidLessThanOrEqual WithPoisonNoPoison PoisonItemmergeWithPoisonwaitForJustOrPoisonwaitForNothingOrPoisonMutex claimMutexnewMutex releaseMutexsearch disableEvents SignalVar SignalValueSignalEventgetEventUniquenewEventnewEventUnique enrollEvent resignEvent enableEventscheckEventForPoison poisonEventtestAllrecordEventLast recordEvent StructuredRevSeqParStrEvent SubTraceStore VCRTraceRev CSPTraceRev Hierarchy TraceStoreNoTraceTraceT RecEventsindivRec indivRecJustgetName nameEvent nameEvent'nameIndivEventnameIndivEvent' mapSubTracemergeSubProcessTracesshouldMakeNewSetVCRcompress addParEventsH addSeqEventHaddRLE labelEvent labelUnique blankTracesGuard EventGuard StopGuard SkipGuard TimeoutGuard skipGuard isSkipGuardbadGuard stopGuard isStopGuard guardWaitForMonadIOStateTReaderT PoisonError checkPoisonCHP'AltableT getAltable getStandard AltableTRetPoisonTpullOutStandardpullOutAltable liftTrace wrapPoison unwrapPoison liftPoisonliftSTM getProcessIdrunCHPProgramWithrunCHPProgramWith'runParallelPoisonforeverGHC.EnumEnumBounded GHC.ClassesEqGHC.Integer.InternalsIntegersyncBarrierWithbuildOnEventPoison scopeBlockMaybeArrow