Changes between Version 4 and Version 5 of TypeFunctionsSyntax
- Timestamp:
- 12/28/06 11:30:17 (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TypeFunctionsSyntax
v4 v5 30 30 We 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. 31 31 32 == Representation of equational constraints == 33 34 Equational constraints are parsed into a new variant of `HsPred`, called `HsEqualP`. Renaming (by `RnTypes.rnPred`) and kind checking (by `TcHsType.kc_pred`) is straight forward. Afterwards, `HsPred` is desugared into `TypeRep.PredType`, where the wellformedness of equational constraints in type contexts is further tested by `TcMType.check_pred_ty`; in particular, we require the type arguments to be rank 0. 35 32 36 == Type tags == 33 37
