Trash/DDC/ClosureTyping

From HaskellWiki
Revision as of 05:09, 19 March 2008 by Benl23 (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Region sharing

Closure typing is used to track the sharing of regions between function calls.

Consider the following function:

f ()
 = do   x = 5
        g () = x
        g

Without closure information this function would have the following type:

f :: forall %r1. () -> () -> Int %r1