|Maintainer||tomac `at` pacific `dot` net `dot` au|
Region based resource management for the IO monad. Based on the ideas and code from http://okmij.org/ftp/Haskell/regions.html
Type Classes and Auxiliary Data Types
IO monad with support for region based resource allocation.
A computation of type
wraps an action of type
IOR r rs a
r is an unconstrained type variable indicating the current region
rs is a collection of all accessible regions within the computation.
Create the initial region,
r, and run the computation returning a
value of type
Create a new region
r. All resources allocated in
r' are only accessible from
r' and any of it's child regions.
On exit from the region, all allocated resources are automatically
A region tag
captures state of the region
r including all
currently allocated resources in