Changes between Version 14 and Version 15 of KindFact


Ignore:
Timestamp:
Sep 14, 2011 7:15:44 AM (3 years ago)
Author:
simonpj
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • KindFact

    v14 v15  
    122122data a ~ b = Eq# (a ~# b) 
    123123}}} 
    124  where `Eq#` is a data constructor with a single, unboxed, zero-width field of type `(a ~# b)`.  See `TysWiredIn.eqTyCon`. 
     124 where `Eq#` is a data constructor with a single, unboxed, zero-width field of type `(a ~# b)`.  See `TysWiredIn.eqTyCon`. [[BR]][[BR]] 
     125 The reason we have both boxed and unboxed forms of equality constraint is that  
     126   * Boxed equality constraints `(a~b)` can be treated uniformly with all other constraints.  This is a big win in the type checker and, more particularly, in sitautions like 
     127{{{ 
     128  type Bla a b = (Eq a, a~b) 
     129}}} 
     130     We have no way to deal with a tuple with some boxed and some unboxed constraints.[[BR]][[BR]] 
     131   * Unboxed equality constraints `(a~#b)` can be implemented much more efficiently at runtime; they take no space, and are passed in zero-width registers (of which we have many!). 
    125132 
    126133  * '''Constraint tuples''' are needed for situations like