Îõ³h&-'+ Ú      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXY "(c) The University of Glasgow 2004/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org experimentalnon-portable (requires STM) Trustworthy6  stm < is an abstract type representing an unbounded FIFO channel.stm#Build and return a new instance of  stmIO version of *. This is useful for creating top-level  s using  , because using   inside   isn't possible.stmCreate a write-only  . More precisely,  will ø 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.stmIO version of .stmWrite a value to a  .stmRead the next value from the  .stm A version of + which does not retry. Instead it returns Nothing if no value is available.stmGet the next value from the TChan8 without removing it, retrying if the channel is empty.stm A version of + which does not retry. Instead it returns Nothing if no value is available.stm 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.stmÉPut a data item back onto a channel, where it will be the next item read.stmReturns Z if the supplied   is empty.stmClone a  î: 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) Trustworthy6ÊstmA Œ is a synchronising variable, used for communication between concurrent threads. It can be thought of as a box, which may be empty or full.stm Create a # which contains the supplied value.stmIO version of *. This is useful for creating top-level s using  , because using   inside   isn't possible.stm Create a  which is initially empty. stmIO version of *. This is useful for creating top-level s using  , because using   inside   isn't possible.!stmReturn the contents of the  . If the + is currently empty, the transaction will  . After a !, the  is left empty."stm A version of ! that does not . The " function returns [ if the  was empty, or \ a if the  was full with contents a . After ", the  is left empty.#stmPut a value into a  . If the  is currently full, # will .$stm A version of # that does not . The $% function attempts to put the value a into the  , returning Z if it was successful, or ] otherwise.%stmThis is a combination of ! and ##; ie. it takes the value from the %, puts it back, and also returns it.&stm A version of %+ which does not retry. Instead it returns Nothing if no value is available.'stmSwap the contents of a  for a new value.(stm'Non-blocking write of a new value to a ' Puts if empty. Replaces if populated.)stmCheck whether a given  is empty.*stmMake a ^ pointer to a <, using the second argument as a finalizer to run when the  is garbage-collected. !"#$%&'()* !#%(&'"$)*"(c) The University of Glasgow 2012/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org experimentalnon-portable (requires STM) Trustworthy6¦ ,stm,< is an abstract type representing an unbounded FIFO channel.-stm$Build and returns a new instance of ,.stmIO version of -*. This is useful for creating top-level ,s using  , because using   inside   isn't possible./stmWrite a value to a ,.0stmRead the next value from the ,.1stm A version of 0+ which does not retry. Instead it returns Nothing if no value is available.2stm*Efficiently read the entire contents of a ,+ into a list. This function never retries.3stmGet the next value from the TQueue8 without removing it, retrying if the channel is empty.4stm A version of 3+ which does not retry. Instead it returns Nothing if no value is available.5stmÉPut a data item back onto a channel, where it will be the next item read.6stmReturns Z if the supplied , is empty. ,-./0123456 ,-.01234/56"(c) The University of Glasgow 2004/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org experimentalnon-portable (requires STM) TrustworthyÊO8stmMutate the contents of a . N.B., this version is non-strict.9stmStrict version of 8.:stmLike 9õ but the function is a simple state transition that can return a side value which is passed on as the result of the .;stmSwap the contents of a  for a new value.<stmMake a ^ pointer to a 8, using the second argument as a finalizer to run when  is garbage-collected  89:;<  89:;<"(c) The University of Glasgow 2004/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org experimentalnon-portable (requires STM) Trustworthyʬ=stm6Check that the boolean condition is true and, if not, .In other words, check b = unless b retry.@stm = = "(c) The University of Glasgow 2005/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org experimentalnon-portable (requires STM) Trustworthy6ÁÃÄÅBAstmA0 is a transactional array, supporting the usual _ interface for mutable arrays."It is conceptually implemented as Array i (TVar e).`stmLike  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.BstmWrites are slow in a.AA"(c) The University of Glasgow 2012/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org experimentalnon-portable (requires STM) Trustworthy6Ü#EstmE9 is an abstract type representing a bounded FIFO channel.Fstm%Builds and returns a new instance of E.GstmIO version of F*. This is useful for creating top-level Es using  , because using   inside   isn't possible.HstmWrite a value to a E; retries if the queue is full.IstmRead the next value from the E ; retries if the queue is empty.Jstm A version of I+ which does not retry. Instead it returns Nothing if no value is available.Kstm*Efficiently read the entire contents of a E+ into a list. This function never retries.LstmGet the next value from the TBQueue6 without removing it, retrying if the queue is empty.Mstm A version of L+ which does not retry. Instead it returns Nothing if no value is available.NstmèPut a data item back onto a channel, where it will be the next item read. Retries if the queue is full.OstmReturn the length of a E.PstmReturns Z if the supplied E is empty.QstmReturns Z if the supplied E is full.Rstm2The maximum number of elements the queue can hold. @since TODOFstm-maximum number of elements the queue can holdEFGHIJKLMNOPQREFGIJKLMHNOPQR "(c) The University of Glasgow 2004/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org experimentalnon-portable (requires STM)Safe#ÐÊ  !"#$%&'()*,-./012345689:;<=AEFGHIJKLMNOPQR"(c) The University of Glasgow 2012/BSD-style (see the file libraries/base/LICENSE)libraries@haskell.org experimentalnon-portable (requires STM) Safe-Inferred6*ºTstmTî is a transactional semaphore. It holds a certain number of units, and units may be acquired or released by V and W respectively. When the T is empty, V blocks. Note that TÐ has no concept of fairness, and there is no guarantee that threads blocked in Vô will be unblocked in the same order; in fact they will all be unblocked at the same time and will fight over the T . Hence TŠ is not suitable if you expect there to be a high number of threads contending for the resource. However, like other STM abstractions, T is composable.UstmConstruct new T with an initial counter value.ÀA positive initial counter value denotes availability of units V can acquire.ðThe initial counter value can be negative which denotes a resource "debt" that requires a respective amount of W operations to counter-balance.VstmWait on T (aka P operation).éThis 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).Wstm Signal a T (aka V operation).âThis operation adds/releases a unit back to the semaphore (i.e. increments the internal counter).XstmMulti-signal a TêThis operation adds/releases multiple units back to the semaphore (i.e. increments the internal counter). signalTSem == signalTSemN 1TUVWXTUVWX Safe*úbstmcstm defbghijckì              !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijkl mn mojkp qrstuvjkw          ø"stm-2.5.2.1-7dOD6LePP76Hp6EM3NyhONControl.Concurrent.STM.TVarControl.Monad.STMControl.Concurrent.STM.TChanControl.Concurrent.STM.TMVarControl.Concurrent.STM.TQueueControl.Concurrent.STM.TArrayControl.Concurrent.STM.TBQueueControl.Concurrent.STM.TSemSystem.IO.UnsafeunsafePerformIOControl.Concurrent.STMControl.Sequential.STMbase GHC.Conc.IO registerDelay GHC.Conc.SyncTVarSTM writeTVarthrowSTMretry readTVarIOreadTVarorElse newTVarIOnewTVarcatchSTM atomicallyTChannewTChan newTChanIOnewBroadcastTChannewBroadcastTChanIO writeTChan readTChan tryReadTChan peekTChan tryPeekTChandupTChan unGetTChan isEmptyTChan cloneTChan $fEqTChanTMVarnewTMVar newTMVarIO newEmptyTMVarnewEmptyTMVarIO takeTMVar tryTakeTMVarputTMVar tryPutTMVar readTMVar tryReadTMVar swapTMVar writeTMVar isEmptyTMVar mkWeakTMVar $fEqTMVarTQueue newTQueue newTQueueIO writeTQueue readTQueue tryReadTQueue flushTQueue peekTQueue tryPeekTQueue unGetTQueue isEmptyTQueue $fEqTQueue modifyTVar modifyTVar' stateTVarswapTVar mkWeakTVarcheck $fMonoidSTM$fSemigroupSTM $fMonadFixSTMTArray$fMArrayTArrayeIO$fMArrayTArrayeSTM $fEqTArrayTBQueue newTBQueue newTBQueueIO writeTBQueue readTBQueuetryReadTBQueue flushTBQueue peekTBQueuetryPeekTBQueue unGetTBQueue lengthTBQueueisEmptyTBQueue isFullTBQueuecapacityTBQueue $fEqTBQueueTSemnewTSemwaitTSem signalTSem signalTSemN$fEqTSemghc-prim GHC.TypesTrue GHC.MaybeNothingJustFalseGHC.WeakWeak array-0.5.4.0Data.Array.BaseMArrayrepIO