unboxed-ref 0.2.0.0 → 0.3.0.0
raw patch · 2 files changed
+5/−5 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- Data/IORef/Unboxed.hs +4/−4
- unboxed-ref.cabal +1/−1
Data/IORef/Unboxed.hs view
@@ -37,7 +37,7 @@ import GHC.Prim import GHC.Types import GHC.ST-import Control.Monad.ST.Unsafe (unsafeSTToIO)+import GHC.IO(stToIO) import Data.STRef.Unboxed.Internal -- | A mutable variable in the IO monad which can hold an instance of 'Prim'.@@ -47,19 +47,19 @@ -- | Build a new 'IORefU' -- newIORefU :: Prim a => a -> IO (IORefU a)-newIORefU init = IORefU `fmap` unsafeSTToIO (newSTRefU init)+newIORefU init = IORefU `fmap` stToIO (newSTRefU init) {-# INLINE newIORefU #-} -- | Read the value of an 'IORefU' -- readIORefU :: Prim a => IORefU a -> IO a-readIORefU (IORefU stRefU) = unsafeSTToIO (readSTRefU stRefU)+readIORefU (IORefU stRefU) = stToIO (readSTRefU stRefU) {-# INLINE readIORefU #-} -- | Write a new value into an 'IORefU' -- writeIORefU :: Prim a => IORefU a -> a -> IO ()-writeIORefU (IORefU stRefU) x = unsafeSTToIO (writeSTRefU stRefU x)+writeIORefU (IORefU stRefU) x = stToIO (writeSTRefU stRefU x) {-# INLINE writeIORefU #-} -- | Mutate the contents of an 'IORef'.
unboxed-ref.cabal view
@@ -1,5 +1,5 @@ name: unboxed-ref-version: 0.2.0.0+version: 0.3.0.0 synopsis: Fast unboxed references for ST and IO monad description: Fast unboxed references for ST and IO monad license: BSD3