Difference between revisions of "Monadic regions"

From HaskellWiki
Jump to navigation Jump to search
m
(link to garbage collector)
 
Line 7: Line 7:
 
while that region is active. The system statically guarantees that no
 
while that region is active. The system statically guarantees that no
 
cell can be accessed when its region is closed. Therefore, all cells in
 
cell can be accessed when its region is closed. Therefore, all cells in
a region can be immediately garbage collected when the region is closed."
+
a region can be immediately [[garbage collector|garbage collected]] when the region is closed."
   
 
"The code gives the first example of the total type comparison
 
"The code gives the first example of the total type comparison

Latest revision as of 17:37, 28 December 2008

"We offer a typeclass-based implementation of Monadic Regions. Region is a memory allocation technique introduced by Tofte and Talpin and implemented in ML-Kit and Cyclone. A region is an area of memory holding heap allocated data (reference cells). Regions may nest and so more than one region may be active at any given point. A new reference cell may only be allocated in an active region, and may then only be used while that region is active. The system statically guarantees that no cell can be accessed when its region is closed. Therefore, all cells in a region can be immediately garbage collected when the region is closed."

"The code gives the first example of the total type comparison predicate, which can handle even non-ground types and quantified type variables."

Monadic regions

Note: afaik, jhc Haskell compiler uses memory regions as its sole memory allocation technique. To be exact, the following is said in docs: "No garbage collector. A variant of Region Inference is in the works."