Rule 76d-exprow-field
Expression Rows
(76)
Comments
The fields are evaluated in no specified order, neither as written nor by label (Section 6.7).
TeX source
\defnrule[r:d-exprow-field]
{\jdg{E}{\expm}{v}\premsep\opt{\jdg{E}{\exprow}{r}}}
{\jdg{E}{\lab\ \kw{=}\ \expm\ \opt{\kw{,}\ \exprow}}{\{\lab\mapsto v\}\opt{+\,r}}}Tests (6)
- elm / DebugLogRecordTupleFieldTestA `Debug.log` call can be used directly as an `Int` or `Float` component of a tuple or field of a record, and the value it returns is stored there.
- elm / EmbeddedMixedConstantsTestA record holding `Nothing`, `[]`, `True`, `""` and `()` returns each value unchanged when its field is read.
- elm / MinimalRecordTestA record expression with one field.
- elm / RecordCreateTestRecord literals with `Int` and `String` fields print correctly through `Debug.log`.
- elm / WideRecord33TestA record with 33 fields, cycling through `Int`, `Float`, `Char`, `String` and `Bool`, supports field access, record patterns, update, equality and printing.
- elm / WideRecord40TestA record with 40 fields, cycling through `Int`, `Float`, `Char`, `String` and `Bool`, supports field access, record patterns, update, equality and printing.
Discussions
Discuss this rule·Search the discussions on GitHub
Discussions are on GitHub; one about this rule has [r:d-exprow-field] in its title.
A Standard Definition of Elm? (Draft version 0.4) © Rupert Smith. The text is licensed under CC BY 4.0: share and adapt it freely, with credit and a link to the licence.