IOR-0.1: Region based resource management for the IO monad.

Maintainertomac `at` pacific `dot` net `dot` au



Mutable references in the IOR monad.



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.


Typeable2 IORRef 
Eq (IORRef r a) 
(Data r, Data a) => Data (IORRef r a) 

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.