Changes between Version 7 and Version 8 of DataParallel/ClosureConversion


Ignore:
Timestamp:
Apr 20, 2007 11:47:38 AM (7 years ago)
Author:
chak
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DataParallel/ClosureConversion

    v7 v8  
    3838==== Mixing converted and vanilla code ==== 
    3939 
     40Mixing converted and vanilla code for closure-conversion is simple as long as we only have lambda terms (we just generate and apply closure as appropriate at places where we move from one representation to another).  However, data types make this more involved again.  Imagine the following scenario: 
     41{{{ 
     42-- converted code 
     43data T = MkT (Int -> Int) 
     44 
     45-- unconverted code 
     46foo = MkT ((+) (1::Int)) 
     47 
     48-- converted code 
     49appT :: T -> Int -> Int 
     50appT (MkT f) x = f x 
     51 
     52bar = appT foo 
     53}}} 
     54Here the result of `foo` needs to be converted before we can call `appT` in `bar`.  In other words, we need conversion functions between converted and unconverted versions of data types. 
     55 
    4056==== An alternative: one-the-fly closure conversion ==== 
    4157