ioref-stable-0.1.1.0: iorefs with a unique stable index

Copyright(c) Moritz Kiefer 2015
LicenseMIT
Maintainermoritz.kiefer@purelyfunctional.org
Safe HaskellSafe
LanguageHaskell2010

Data.IORefStable

Description

The IORefStable type

Synopsis

Documentation

data IORefStable a Source #

A mutable variable in the IO monad indexed by a Unique to provide an Ord instance

Constructors

IORefStable !Unique !(IORef a) 

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