Changes between Version 24 and Version 25 of DataParallel/ClosureConversion/ClassLess


Ignore:
Timestamp:
Apr 27, 2007 7:16:29 AM (8 years ago)
Author:
chak
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DataParallel/ClosureConversion/ClassLess

    v24 v25  
    7979Note that basic types, such as `Int` and friends, should have `tyConCC` set to `ConvCC (Int, isoInt)` with identity conversions `isoInt = id :<->: id`. 
    8080 
    81 === Converting class declarations === 
    82  
    83 If we come across a class declaration for a class `C` during conversion, we convert it generating `C_CC`.  Like with type constructors, `Class.Class` gets a `classCC :: StatusCC Class` field that is `ConvCC C_CC` for classes that have a conversion.  We also ensure that the `classTyCon` of `C`, let's call it `T_C`, refers to `T_C_CC` and `fr_T_C` and `to_T_C` in its `tyConCC` field, and that the `classTyCon` of `C_CC` is `T_C_CC`. 
     81=== Converting class and instances === 
     82 
     83We don't alter class and instance declarations in any way.  However, the dictionary type constructors and dfuns are processed in the same way as other data types and value bindings, respectively; i.e., they get a `StatusCC` field and we generate converted versions and conversion constructors as usual. 
     84 
     85---- 
     86chak: revision front 
     87---- 
    8488 
    8589=== Converting instance declarations === 
     
    138142=== Issues, aka rl's complaints === 
    139143 
     144==== Unboxed types ==== 
     145 
     146Consider 
     147{{{ 
     148data Int = Int# I# 
     149}}} 
     150The declaration has no arrow, so we set its `tyConCC` field to `ConvCC Int` (given that we know that all unboxed types can be used unaltered).  Moreover, {{{Int# :: I# -> Int}}} has no converted form as is has an unboxed argument. 
     151 
    140152==== Non-converted versus unchanged type declarations ==== 
    141153 
     
    179191==== Classes ==== 
    180192 
     193'''This issue has now been addressed''' 
     194 
    181195It might be sufficient to never convert class declarations as a whole, but only their representation types. 
    182196