Changes between Version 6 and Version 7 of TypeFunctions


Ignore:
Timestamp:
Jul 28, 2006 6:54:49 PM (9 years ago)
Author:
chak
Comment:

type checking class declarations with assoc data types

Legend:

Unmodified
Added
Removed
Modified
  • TypeFunctions

    v6 v7  
    5353
    5454During renaming, AT declarations in classes are checked for being empty (i.e., no constructors and no context) and for conformance of the type parameters with those of the class. We also check all parameters are type variables, and we inherit kind signatures from the corresponding class parameters (if any of these already have kind signatures, we raise an error) - in fact, we inherit the `Name`s of the class parameters. Afterwards, `tcdTyPats` is reset to `Nothing`.
     55
     56=== Type checking associated data types ===
     57
     58Class declarations:
     59 * As part of the knot typing exercises in `TcTyClsDecls.tcTyAndClassDecls`, we extract all AT declarations from classes and add them to the list of class and data type declarations to be processed. This ensures that AT declarations participate in kind checking and that they are entered into the global type-checker environment.
     60 * We do ''not'' update the data declarations within class declarations (field `tcdATs` within `ClassDecl`), as the `Class.Class` structure produced by the type checker only contains the `Id`s of a classes associated types.
     61 * We check that we have -fglasgow-exts.