IOR-0.1: Region based resource management for the IO monad.
Data.IORRef
Description
Mutable references in the IOR monad.
Synopsis
data IORRef r a Source
A value of type IORRef r a is a mutable variable in region r, containing a value of type a.
IORRef r a
IORRef
r
a
Instances
newIORRef :: a -> IOR r rs (IORRef r a)Source
Create a new IORRef in region r.
readIORRef :: RElem r' rs => IORRef r' a -> IOR r rs aSource
Read the value of an IORRef.
writeIORRef :: RElem r' rs => IORRef r' a -> a -> IOR r rs ()Source
Write a new value into an IORRef.
modifyIORRef :: RElem r' rs => IORRef r' a -> (a -> a) -> IOR r rs ()Source
Mutate the contents of an IORRef.