extra-1.5: Extra functions I use.

Safe HaskellSafe-Inferred

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

Documentation

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

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

Evaluates the value before calling writeIORef.

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

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

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

Evaluates the value before calling atomicWriteIORef.