Changes between Version 36 and Version 37 of TypeFunctionsTypeChecking
- Timestamp:
- 09/13/06 17:04:55 (7 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TypeFunctionsTypeChecking
v36 v37 115 115 116 116 The matching against the family type constructor and unification with the instance types corresponds to applying the coercion moving between the family and representation type of a data instance, which is returned by `tyConFamilyCoercion_maybe`. To generate type correct core, this coercion needs to be applied to the scrutinee of the case expression matching on the constructor pattern. This is done by the local function `unwrapFamInstScrutinee` whenever we match against the data constructor of a family by wrapping the result pattern into a `CoPat` containing an `ExprCoFn` with the coercion. 117 118 == Checking for overlapping data/newtype instances == 119 120 === Overlap check of the instances within one module === 121 122 We maintain a family instance environment in the `TcRnTypes.TcGblEnv` much like that for class instances. We add instances to this environment as we type check them and perform an overlap check with each addition.
