)U      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRST "(c) The University of Glasgow 2012/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org experimentalnon-portable (requires STM) Trustworthy1 9 is an abstract type representing a bounded 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 ; blocks if the queue is full.Read the next value from the . A version of + which does not retry. Instead it returns Nothing if no value is available.*Efficiently read the entire contents of a + into a list. This function never retries.Get the next value from the TBQueue8 without removing it, retrying if the channel is empty. A version of + which does not retry. Instead it returns Nothing if no value is available.gPut a data item back onto a channel, where it will be the next item read. Blocks if the queue is full.Returns U if the supplied  is empty.Returns U if the supplied  is full.-maximum number of elements the queue can hold  "(c) The University of Glasgow 2004/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org experimentalnon-portable (requires STM) Trustworthy14< is an abstract type representing an unbounded FIFO channel.#Build and return a new instance of IO version of *. This is useful for creating top-level s using  , because using   inside   isn't possible.Create a write-only . More precisely, " will  x even after items have been written to the channel. The only way to read a broadcast channel is to duplicate it with &.6Consider a server that broadcasts messages to clients: serve :: TChan Message -> Client -> IO loop serve broadcastChan client = do myChan <- dupTChan broadcastChan forever $ do message <- readTChan myChan send client messageThe problem with using | to create the broadcast channel is that if it is only written to and never read, items will pile up in memory. By using _ to create the broadcast channel, items can be garbage collected after clients have seen them. IO version of .!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.$Get the next value from the TChan8 without removing it, retrying if the channel is empty.% A version of $+ which does not retry. Instead it returns Nothing if no value is available.& Duplicate a : the duplicate channel begins empty, but data written to either channel from then on will be available from both. Hence this creates a kind of broadcast channel, where data written by anyone is seen by everyone else.'IPut a data item back onto a channel, where it will be the next item read.(Returns U if the supplied  is empty.)Clone a n: similar to dupTChan, but the cloned channel starts with the same content available as the original channel. !"#$%&'() &)"#$%!'("(c) The University of Glasgow 2004/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org experimentalnon-portable (requires STM) Trustworthy1DM+A + is a synchronising variable, used for communication between concurrent threads. It can be thought of as a box, which may be empty or full., Create a +# which contains the supplied value.-IO version of ,*. This is useful for creating top-level +s using  , because using   inside   isn't possible.. Create a + which is initially empty./IO version of .*. This is useful for creating top-level +s using  , because using   inside   isn't possible.0Return the contents of the + . If the ++ is currently empty, the transaction will   . After a 0, the + is left empty.1 A version of 0 that does not  . The 1 function returns V if the + was empty, or W a if the + was full with contents a . After 1, the + is left empty.2Put a value into a + . If the + is currently full, 2 will  .3 A version of 2 that does not  . The 3% function attempts to put the value a into the + , returning U if it was successful, or X otherwise.4This is a combination of 0 and 2#; ie. it takes the value from the +%, puts it back, and also returns it.5 A version of 4+ which does not retry. Instead it returns Nothing if no value is available.6Swap the contents of a + for a new value.7Check whether a given + is empty.8Make a Y pointer to a +<, using the second argument as a finalizer to run when the + is garbage-collected.+,-./012345678+,.-/024561378"(c) The University of Glasgow 2012/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org experimentalnon-portable (requires STM) Trustworthy1\i ::< 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.@*Efficiently read the entire contents of a :+ into a list. This function never retries.AGet the next value from the TQueue8 without removing it, retrying if the channel is empty.B A version of A+ which does not retry. Instead it returns Nothing if no value is available.CIPut a data item back onto a channel, where it will be the next item read.DReturns U if the supplied : is empty. :;<=>?@ABCD :;<>?@AB=CD"(c) The University of Glasgow 2004/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org experimentalnon-portable (requires STM) TrustworthyDcuFMutate the contents of a . N.B., this version is non-strict.GStrict version of F.HSwap the contents of a  for a new value.IMake a Y pointer to a 8, using the second argument as a finalizer to run when  is garbage-collected FGHI FGHI"(c) The University of Glasgow 2005/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org experimentalnon-portable (requires STM) Trustworthy1;=>?nNJ6TArray is a transactional array, supporting the usual Z interface for mutable arrays.It is currently implemented as Array ix (TVar e)z, but it may be replaced by a more efficient implementation in the future (the interface will remain the same, however).[Like  replicateM= but uses an accumulator to prevent stack overflows. Unlike  replicateM the returned list is in reversed order. This doesn't matter though since this function is only used to create arrays with identical elements.JJ"(c) The University of Glasgow 2004/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org experimentalnon-portable (requires STM) TrustworthyDrM6Check that the boolean condition is true and, if not,  .In other words, check b = unless b retry.N  M  M  "(c) The University of Glasgow 2004/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org experimentalnon-portable (requires STM)SafeuH  !"#$%&'()+,-./012345678:;<=>?@ABCDFGHIJM"(c) The University of Glasgow 2012/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org experimentalnon-portable (requires STM)Safe1XOOn is a transactional semaphore. It holds a certain number of units, and units may be acquired or released by Q and R respectively. When the O is empty, Q blocks. Note that OP has no concept of fairness, and there is no guarantee that threads blocked in Qt will be unblocked in the same order; in fact they will all be unblocked at the same time and will fight over the O . Hence O is not suitable if you expect there to be a high number of threads contending for the resource. However, like other STM abstractions, O is composable.PConstruct new O with an initial counter value.@A positive initial counter value denotes availability of units Q can acquire.pThe initial counter value can be negative which denotes a resource "debt" that requires a respective amount of R operations to counter-balance.QWait on O (aka P operation).iThis operation acquires a unit from the semaphore (i.e. decreases the internal counter) and blocks (via  5) if no units are available (i.e. if the counter is not positive).R Signal a O (aka V operation).bThis operation adds/releases a unit back to the semaphore (i.e. increments the internal counter).SMulti-signal a OjThis operation adds/releases multiple units back to the semaphore (i.e. increments the internal counter). signalTSem == signalTSemN 1OPQRSOPQRS Safe\] ^_`\abcd]ef                !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefg hi hjefk lmnopq          rstm-2.4.5.0-inplaceControl.Concurrent.STM.TVarControl.Monad.STMControl.Concurrent.STM.TBQueueControl.Concurrent.STM.TChanControl.Concurrent.STM.TMVarControl.Concurrent.STM.TQueueControl.Concurrent.STM.TArrayControl.Concurrent.STM.TSemSystem.IO.UnsafeunsafePerformIOControl.Concurrent.STMControl.Sequential.STMbase GHC.Conc.IO registerDelay GHC.Conc.Sync writeTVarreadTVar readTVarIO newTVarIOnewTVaralwaysalwaysSucceedscatchSTMthrowSTMorElseretry atomicallySTMTVarTBQueue newTBQueue newTBQueueIO writeTBQueue readTBQueuetryReadTBQueue flushTBQueue peekTBQueuetryPeekTBQueue unGetTBQueueisEmptyTBQueue isFullTBQueue $fEqTBQueueTChannewTChan newTChanIOnewBroadcastTChannewBroadcastTChanIO writeTChan readTChan tryReadTChan peekTChan tryPeekTChandupTChan unGetTChan isEmptyTChan cloneTChan $fEqTChanTMVarnewTMVar newTMVarIO newEmptyTMVarnewEmptyTMVarIO takeTMVar tryTakeTMVarputTMVar tryPutTMVar readTMVar tryReadTMVar swapTMVar isEmptyTMVar mkWeakTMVar $fEqTMVarTQueue newTQueue newTQueueIO writeTQueue readTQueue tryReadTQueue flushTQueue peekTQueue tryPeekTQueue unGetTQueue isEmptyTQueue $fEqTQueue modifyTVar modifyTVar'swapTVar mkWeakTVarTArray$fMArrayTArrayeSTM $fEqTArraycheck $fMonadFixSTMTSemnewTSemwaitTSem signalTSem signalTSemN$fEqTSemghc-prim GHC.TypesTrueGHC.BaseNothingJustFalseGHC.WeakWeak array-0.5.2.0Data.Array.BaseMArrayrep