úÎL H@      !"#$%&'()*+,-./0123456789:;<=>?None5Create a new counter initialized to the given value. )Increment the counter by a given amount. 4 Returns the original value before the increment. LNote that UNLIKE with boxed implementations of counters, where increment is # based on CAS, this increment is O(1)*. Fetch-and-add does not require a retry  loop like CAS. %An alternate version for when you don't care about the old value. Just like the  Data.Atomics/ CAS interface, this routine returns an opaque , ticket that can be used in CAS operations. NOpaque tickets cannot be constructed, but they can be destructed into values. Equivalent to  followed by . <Make a non-atomic write to the counter. No memory-barrier. &Compare and swap for the counter ADT.      None 5Create a new counter initialized to the given value. NTry repeatedly until we successfully increment the counter by a given amount. < Returns the original value of the counter (pre-increment). Just like the  Data.Atomics/ CAS interface, this routine returns an opaque , ticket that can be used in CAS operations. NOpaque tickets cannot be constructed, but they can be destructed into values. Equivalent to  followed by . <Make a non-atomic write to the counter. No memory-barrier. &Compare and swap for the counter ADT. @     @ 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. A6This 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. ABCDE  ABCDENone 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  F. Returns a tuple containing a G which is H when a # swap is performed, along with the current value from the F. Note "compare"- here means pointer equality in the sense of  I. $)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 F 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 %J&'()*+ !"#$%&'()*+% !"#$&'()*+ !"#$%J&'()*+None .5Create a new counter initialized to the given value. K%Create a new, uninitialized counter. /Equivalent to 1 followed by 2 . 0<Make a non-atomic write to the counter. No memory-barrier. 1Just like the  Data.Atomics/ CAS interface, this routine returns an opaque , ticket that can be used in CAS operations. 2NOpaque tickets cannot be constructed, but they can be destructed into values. 3&Compare and swap for the counter ADT. 4)Increment the counter by a given amount. 4 Returns the original value before the increment. LNote that UNLIKE with boxed implementations of counters, where increment is # based on CAS, this increment is O(1)*. Fetch-and-add does not require a retry  loop like CAS. 5%An alternate version for when you don't care about the old value. ,-L.K/0123M45 ,-./012345 -,.1/20345 ,-L.K/0123M45None ,-./012345None85Create a new counter initialized to the given value. 9NTry repeatedly until we successfully increment the counter by a given amount. < Returns the original value of the counter (pre-increment). ;Just like the  Data.Atomics/ CAS interface, this routine returns an opaque , ticket that can be used in CAS operations. <NOpaque tickets cannot be constructed, but they can be destructed into values. =Equivalent to ; followed by <. ><Make a non-atomic write to the counter. No memory-barrier. ?&Compare and swap for the counter ADT. 67N89:;<=>? 6789:;<=>? 768;=<>?9: 67N89:;<=>?O           !"#$%&'()           *+,-./0123423526789 : ;atomic-primops-0.4Data.Atomics.Counter.ForeignData.Atomics.Counter.ReferenceData.Atomics.Internal Data.AtomicsData.Atomics.Counter.UnboxedData.Atomics.Counter.IORefData.Atomics.CounterCTicket AtomicCounter newCounter incrCounter incrCounter_readCounterForCAS peekCTicket readCounter writeCounter casCounterTicketfetchAddByteArrayInt#casByteArrayInt#stg_writeBarrier#stg_loadLoadBarrier#stg_storeLoadBarrier# casArray# readForCAS#casMutVarTicketed# casArrayElem casArrayElem2 readArrayElemcasByteArrayIntfetchAddByteArrayInt readForCAScasIORef casIORef2 peekTicketreadMutVarForCAS casMutVar casMutVar2storeLoadBarrierloadLoadBarrier writeBarriercasMutVar_TypeErased#casArrayTypeErased#ptrEq$fEqAny $fShowAnybase GHC.IORefIORefghc-prim GHC.TypesBoolTrueGHC.PrimreallyUnsafePtrEquality#seal newRawCounter sameCTicket