extra-1.8: Extra functions I use.
Safe HaskellSafe-Inferred
LanguageHaskell2010

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

data IORef a #

Instances

Instances details
NFData1 IORef 
Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> IORef a -> ()

NFData (IORef a) 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: IORef a -> ()

Eq (IORef a) 
Instance details

Defined in GHC.Internal.IORef

Methods

(==) :: IORef a -> IORef a -> Bool

(/=) :: IORef a -> IORef a -> Bool

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 () 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