Cambridge Journals Online

Cambridge Journals Online
Skip to content
Journal of Functional Programming (2006), 16: 485-545 Cambridge University Press
Copyright © 2006 Cambridge University Press
doi:10.1017/S095679680600596X
Published online by Cambridge University Press 10 Aug 2006


Article

Monadic regions 1


MATTHEW FLUET a1 and GREG MORRISETT a2
a1 Department of Computer Science, Cornell University, Ithaca, NY 14853, USA (email: fluet@cs.cornell.edu)
a2 Division of Engineering and Applied Science, Harvard University, Cambridge, MA 02138, USA (email: greg@eecs.harvard.edu)

Article author query
fluet m   [Google Scholar
morrisett g   [Google Scholar
 

Abstract

Region-based type systems provide programmer control over memory management without sacrificing type-safety. However, the type systems for region-based languages, such as the ML-Kit or Cyclone, are relatively complicated, and proving their soundness is non-trivial. This paper shows that the complication is in principle unnecessary. In particular, we show that plain old parametric polymorphism, as found in Haskell, is all that is needed. We substantiate this claim by giving a type- and meaning-preserving translation from a variation of the region calculus of Tofte and Talpin to a monadic variant of System F with region primitives whose types and operations are inspired by (and generalize) the ST monad of Launchbury and Peyton Jones.

(Published Online August 10 2006)



Footnotes

1 This is a revised and extended version of the paper that appeared in the Ninth ACM SIGPLAN International Conference on Functional Programming (ICFP'04) (Fluet & Morrisett, 2004).



Cambridge University Press