Changes between Version 16 and Version 17 of TypeFunctions


Ignore:
Timestamp:
Jul 31, 2006 8:06:46 PM (8 years ago)
Author:
chak
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TypeFunctions

    v16 v17  
    5656=== Representation of associated types === 
    5757 
    58 Adding types declarations to classes is fairly straight forward. The {{{ClassDecl}}} variant of {{{TyClDecl}}} gets a new field {{{tcdATs}}}, which contains a list of type declarations - currently, the parser will only allow data type declarations. Similarly, {{{InstDecl}}} gets a fourth argument, which is a list of type declarations. 
     58We add type declarations to class declarations and instance declarations by a new field (of type `[LTyClDecl]`) to both `TyClDecl.ClassDecl` (known by the field name `tcdATs`) and `TyClDecl.InstDecl`.  For classes, this new field contains values constructed from `TyData`, `TyFunction`, and `TySynonym`, whereas for instances, we only have `TyData` and `TySynonym`.  This is due to (a) `TyData` representing both signatures and definitions of associated data types (whereas the two are split into `TyFunction` and `TySynonym` for associated synonyms) and (b) associated synonyms having default definitions, which associated data types do not possess. 
    5959 
    6060=== Phasing ===