Changes between Version 2 and Version 3 of Records/ExplicitClassyRecords


Ignore:
Timestamp:
Apr 23, 2012 12:00:54 PM (3 years ago)
Author:
strake888
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Records/ExplicitClassyRecords

    v2 v3  
    2525'''then''' automatic instance `C ... x ... (R x) where x (R { x = x }) = x`;
    2626'''else''' type error.
     27
     28The semantics of the record mutation
     29{{{
     30(r :: R) { x = x' }
     31}}}
     32are 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{{{
     37x s = x', y s = y r
     38}}}
     39where `y` is any other selector.