Changes between Version 2 and Version 3 of Records/ExplicitClassyRecords
- Timestamp:
- 04/23/12 05:00:54 (14 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Records/ExplicitClassyRecords
v2 v3 25 25 '''then''' automatic instance `C ... x ... (R x) where x (R { x = x }) = x`; 26 26 '''else''' type error. 27 28 The semantics of the record mutation 29 {{{ 30 (r :: R) { x = x' } 31 }}} 32 are these:[[BR]] 33 '''If''' `x` is in scope, part of some class `C ... x ... a`, and of type `C ... x ... a => a -> x`, 34 '''and''' an instance `C ... x ... R` is in scope, '''and''' types of `x` and `x'` can be unified, i.e. `x=x'` would be valid in instance declaration of `C ... x ... a`; 35 '''then''' its value is `s` such that 36 {{{ 37 x s = x', y s = y r 38 }}} 39 where `y` is any other selector.
