Copyright | (c) Moritz Kiefer 2015 |
---|---|
License | MIT |
Maintainer | moritz.kiefer@purelyfunctional.org |
Safe Haskell | Safe |
Language | Haskell2010 |
Data.IORefStable
Description
The IORefStable type
- data IORefStable a = IORefStable !Unique !(IORef a)
- newIORefStable :: a -> IO (IORefStable a)
- readIORefStable :: IORefStable a -> IO a
- writeIORefStable :: IORefStable a -> a -> IO ()
- modifyIORefStable :: IORefStable a -> (a -> a) -> IO ()
- modifyIORefStable' :: IORefStable a -> (a -> a) -> IO ()
- atomicModifyIORefStable :: IORefStable a -> (a -> (a, b)) -> IO b
- atomicModifyIORefStable' :: IORefStable a -> (a -> (a, b)) -> IO b
- atomicWriteIORefStable :: IORefStable a -> a -> IO ()
Documentation
data IORefStable a Source #
Constructors
IORefStable !Unique !(IORef a) |
Instances
Eq (IORefStable a) Source # | |
Ord (IORefStable a) Source # | |
newIORefStable :: a -> IO (IORefStable a) Source #
Build a new IORefStable
readIORefStable :: IORefStable a -> IO a Source #
Read the value of an IORefStable
writeIORefStable :: IORefStable a -> a -> IO () Source #
Write a new value into an IORefStable
modifyIORefStable :: IORefStable a -> (a -> a) -> IO () Source #
Mutate the contents of an IORefStable
modifyIORefStable' :: IORefStable a -> (a -> a) -> IO () Source #
Strict version of modifyIORefStable
atomicModifyIORefStable :: IORefStable a -> (a -> (a, b)) -> IO b Source #
Atomically modifies the contents of an IORefStable
atomicModifyIORefStable' :: IORefStable a -> (a -> (a, b)) -> IO b Source #
Strict version of atomicModifyIORefStable
atomicWriteIORefStable :: IORefStable a -> a -> IO () Source #
Atomically write a new value into an IORefStable