extra-0.5.1: Extra functions I use.

Safe HaskellSafe-Inferred

Data.IORef.Extra

Synopsis

Documentation

module Data.IORef

modifyIORef' :: IORef a -> (a -> a) -> IO ()

Strict version of modifyIORef

writeIORef' :: IORef a -> a -> IO ()Source

Evaluates the value before calling writeIORef.

atomicModifyIORef' :: IORef a -> (a -> (a, b)) -> IO b

Strict version of atomicModifyIORef. This forces both the value stored in the IORef as well as the value returned.

atomicWriteIORef :: IORef a -> a -> IO ()

Variant of writeIORef with the "barrier to reordering" property that atomicModifyIORef has.

atomicWriteIORef' :: IORef a -> a -> IO ()Source

Evaluates the value before calling atomicWriteIORef.