Changes between Version 24 and Version 25 of DataParallel/ClosureConversion/ClassLess
- Timestamp:
- 04/27/07 00:16:29 (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
DataParallel/ClosureConversion/ClassLess
v24 v25 79 79 Note that basic types, such as `Int` and friends, should have `tyConCC` set to `ConvCC (Int, isoInt)` with identity conversions `isoInt = id :<->: id`. 80 80 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 83 We 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 ---- 86 chak: revision front 87 ---- 84 88 85 89 === Converting instance declarations === … … 138 142 === Issues, aka rl's complaints === 139 143 144 ==== Unboxed types ==== 145 146 Consider 147 {{{ 148 data Int = Int# I# 149 }}} 150 The 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 140 152 ==== Non-converted versus unchanged type declarations ==== 141 153 … … 179 191 ==== Classes ==== 180 192 193 '''This issue has now been addressed''' 194 181 195 It might be sufficient to never convert class declarations as a whole, but only their representation types. 182 196
