Changes between Version 2 and Version 3 of DataParallel/ClosureConversion


Ignore:
Timestamp:
Apr 17, 2007 10:56:55 AM (8 years ago)
Author:
guest
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DataParallel/ClosureConversion

    v2 v3  
    22
    33'''TODO:''' describe the treatment of higher-order functions and closure conversion here. The relevant paper is [http://www.cse.unsw.edu.au/~chak/papers/LCK06.html]. The approach is described in more detail in [http://opus.kobv.de/tuberlin/volltexte/2006/1286/].
     4
     5=== Closure-converted types as indexed-types ===
     6
     7After some brainstorming, Roman and I (= Manuel) came to the conclusion that we can save ourselves a lot of bookkeeping if we can represent closure-converted types by indexed types (i.e., keeping track of which original types correspond to which converted types).  The idea is to use a class
     8{{{
     9class CC a where
     10  data CConv a        -- closure converted 'a'
     11  to :: a -> CConv a
     12  fr :: CConv a -> a
     13}}}
     14The most interesting instance is that for functions, which reads
     15{{{
     16data Clo a b = forall e. Clo (c -> a -> b) e
     17
     18class (CC a, CC b) => CC (a -> b) where
     19  data CConv (a -> b) = CCArrow (Clo a b)
     20  to f = Clo (\_ -> f) ()
     21  fr (Clo f e) = f e
     22}}}
    423
    524=== From the Skype discussion, 16 Mar 07 ===