Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Data.IORef.Extra
Description
This module extends Data.IORef with operations forcing the value written to the IORef. Some of these functions are available in later versions of GHC, but not all.
Synopsis
- data IORef a
- writeIORef :: IORef a -> a -> IO ()
- atomicWriteIORef :: IORef a -> a -> IO ()
- atomicModifyIORef :: IORef a -> (a -> (a, b)) -> IO b
- atomicModifyIORef' :: IORef a -> (a -> (a, b)) -> IO b
- mkWeakIORef :: IORef a -> IO () -> IO (Weak (IORef a))
- modifyIORef :: IORef a -> (a -> a) -> IO ()
- modifyIORef' :: IORef a -> (a -> a) -> IO ()
- newIORef :: a -> IO (IORef a)
- readIORef :: IORef a -> IO a
- writeIORef' :: IORef a -> a -> IO ()
- atomicWriteIORef' :: IORef a -> a -> IO ()
- atomicModifyIORef_ :: IORef a -> (a -> a) -> IO ()
- atomicModifyIORef'_ :: IORef a -> (a -> a) -> IO ()
Documentation
writeIORef :: IORef a -> a -> IO () #
atomicWriteIORef :: IORef a -> a -> IO () #
atomicModifyIORef :: IORef a -> (a -> (a, b)) -> IO b #
atomicModifyIORef' :: IORef a -> (a -> (a, b)) -> IO b #
modifyIORef :: IORef a -> (a -> a) -> IO () #
modifyIORef' :: IORef a -> (a -> a) -> IO () #
writeIORef' :: IORef a -> a -> IO () Source #
Evaluates the value before calling writeIORef
.
atomicWriteIORef' :: IORef a -> a -> IO () Source #
Evaluates the value before calling atomicWriteIORef
.
atomicModifyIORef_ :: IORef a -> (a -> a) -> IO () Source #
Variant of atomicModifyIORef
which ignores the return value
atomicModifyIORef'_ :: IORef a -> (a -> a) -> IO () Source #
Variant of atomicModifyIORef'
which ignores the return value