úÎ)T&g/      !"#$%&'()*+,-.None*Create a new counter initialized to zero. <Try repeatedly until we successfully increment the counter. 2 Returns the original value before the increment. <Make a non-atomic write to the counter. No memory-barrier.    None *Create a new counter initialized to zero. <Try repeatedly until we successfully increment the counter.  incrCounter = <Make a non-atomic write to the counter. No memory-barrier.     None'When performing compare-and-swaps, the ticket encapsulates proof ? that a thread observed a specific previous value of a mutable * variable. It is provided in lieu of the old value to  compare-and-swap. /6This alternate version of casMutVar returns an opaque ticket for  future CAS operations. OUnsafe, machine-level atomic compare and swap on an element within an Array. /0123 /0123None Compare-and-swap $This variant takes two tickets: the new" value is a ticket rather than an # arbitrary, lifted, Haskell value. :Performs a machine-level compare and swap operation on an  4. Returns a tuple containing a 5 which is 6 when a # swap is performed, along with the current value from the 4. Note "compare"- here means pointer equality in the sense of  7. )This variant takes two tickets, i.e. the new" value is a ticket rather than an # arbitrary, lifted, Haskell value. 7A ticket contains or can get the usable Haskell value. !MutVar counterpart of . ")This variant takes two tickets, i.e. the new" value is a ticket rather than an # arbitrary, lifted, Haskell value. #3Memory barrier implemented by the GHC rts (SMP.h). $3Memory barrier implemented by the GHC rts (SMP.h). %3Memory barrier implemented by the GHC rts (SMP.h). The 4 containing a value current A ticket for the old value The new value to replace current if old == current A ticket for the old value A ticket for the new value 8 !"#$% !"#$% !"#$%8 !"#$%None)*Create a new counter initialized to zero. *<Try repeatedly until we successfully increment the counter.  incrCounter = -<Make a non-atomic write to the counter. No memory-barrier. &'()*+,-. &'()*+,-. '(&)*+,-.&'()*+,-.None &'()*+,-.9          !"#    $%&'()*+,-.,-/,0123atomic-primops-0.2.2Data.Atomics.Counter.ForeignData.Atomics.Counter.ReferenceData.Atomics.Internal Data.AtomicsData.Atomics.Counter.IORefData.Atomics.CounterCTicket AtomicCounter newCounter incrCounterreadCounterForCAS peekCTicket readCounter writeCounter casCounterTicketstg_writeBarrier#stg_loadLoadBarrier#stg_storeLoadBarrier# casArray# readForCAS#casMutVarTicketed# casArrayElem casArrayElem2 readArrayElem readForCAScasIORef casIORef2 peekTicketreadMutVarForCAS casMutVar casMutVar2storeLoadBarrierloadLoadBarrier writeBarriercasMutVar_TypeErased#casArrayTypeErased#ptrEq$fEqAny $fShowAnybase GHC.IORefIORefghc-prim GHC.TypesBoolTrueGHC.PrimreallyUnsafePtrEquality#seal