Changes between Version 2 and Version 3 of TypeDirectedNameResolution
- Timestamp:
- 07/17/09 03:59:59 (4 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TypeDirectedNameResolution
v2 v3 82 82 The basic design is simple: 83 83 84 * There is a new lexeme, of the form `'.' varid`, which we call `dot_var`. 85 The part after the dot a simple unqualified name (not a qualified name). 86 84 87 * Extend the syntax of atoms: 85 88 {{{ … … 87 90 | var_unqual -- Unqualified variable name 88 91 | '(' expr ')' -- Parenthesised expression 89 | atom '.' var_unqual -- TDNR invocation 90 }}} 91 The part after the dot a simple unqualified name (not a qualified name). 92 | atom dot_var -- TDNR invocation 93 }}} 92 94 For example, `a`, `a.f` and `a.f.g` are atoms. 93 95 … … 238 240 propose ''not'' to apply it to record update, a construct that is already 239 241 rather complicated to typecheck. I do not want to make it worse. 242 243 == section-style selection == 244 245 We have the option to allow '(.x)' as a valid expression, with its meaning given by the translation 246 247 {{{ 248 (.x) === (\f -> f.x) 249 }}} 250 251 This allows things like 252 253 {{{ 254 map (.x) rs 255 }}} 256 257 and means that `(.x) f` is equivalent to `f.x`. The syntax and meaning is consistent with right-section, although it is not really a right-section. 258 259 What about `(.x.y)`? Does that expand to `(\f -> f.x.y)`?
