IORefCAS 0.0.1.2 → 0.1.0.1
raw patch · 2 files changed
+9/−2 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
+ Data.CAS: ptrEq :: a -> a -> Bool
Files
- Data/CAS.hs +7/−1
- IORefCAS.cabal +2/−1
Data/CAS.hs view
@@ -3,7 +3,7 @@ -- | Atomic compare and swap for IORefs and STRefs. module Data.CAS - ( casSTRef, casIORef,+ ( casSTRef, casIORef, ptrEq, atomicModifyIORefCAS, atomicModifyIORefCAS_, -- * Generic interface: for interoperation with `Fake` and `Foreign` alternative libraries.@@ -32,6 +32,9 @@ -- | Performs a machine-level compare and swap operation on an -- 'STRef'. Returns a tuple containing a 'Bool' which is 'True' when a -- swap is performed, along with the 'current' value from the 'STRef'.+-- +-- Note \"compare\" here means pointer equality in the sense of+-- 'GHC.Prim.reallyUnsafePtrEquality#'. casSTRef :: STRef s a -- ^ The 'STRef' containing a value 'current' -> a -- ^ The 'old' value to compare -> a -- ^ The 'new' value to replace 'current' if @old == current@@@ -46,6 +49,9 @@ -- | Performs a machine-level compare and swap operation on an -- 'IORef'. Returns a tuple containing a 'Bool' which is 'True' when a -- swap is performed, along with the 'current' value from the 'IORef'.+-- +-- Note \"compare\" here means pointer equality in the sense of+-- 'GHC.Prim.reallyUnsafePtrEquality#'. casIORef :: IORef a -- ^ The 'IORef' containing a value 'current' -> a -- ^ The 'old' value to compare -> a -- ^ The 'new' value to replace 'current' if @old == current@
IORefCAS.cabal view
@@ -1,5 +1,5 @@ Name: IORefCAS-Version: 0.0.1.2+Version: 0.1.0.1 License: BSD3 License-file: LICENSE Author: Adam C. Foltzer, Ryan Newton@@ -12,6 +12,7 @@ -- 0.0.1 -- initial release -- 0.0.1.1 -- minor bump to include README -- 0.0.1.2 -- Egad, super minor update.+-- 0.1.0.1 -- Include ptrEq in Data.CAS Synopsis: Atomic compare and swap for IORefs and STRefs.