Restrictioncore-adjacent-items
The following constructs require two items to be adjacent, that is, to have no whitespace or comment between them:
the parentheses of the unit
(), and the operator and parentheses of an operator value();the
.of a long identifier and the items on either side of it;the
.of a field selection.and the items on either side of it, and the.of a field accessor.and the label after it. A.adjacent to a following label is the.of a field selection only if it is adjacent to the item before it and that item ends an atomic expression that may precede a field selection (Section 2.10); otherwise it begins a field accessor (Appendix A). In particular a.directly after a field accessor begins a field accessor;the negation symbol and the atomic expression it negates.
Tests (2)
- elm / InfixNegatedOperandTestA negation symbol in an operator chain negates the atomic expression after it, and no more.
- elm / StandardA1UnitPatternGapTestThe unit pattern is `()`, with nothing between the parentheses.
Discussions
Discuss this restriction·Search the discussions on GitHub
Discussions are on GitHub; one about this restriction has [res:core-adjacent-items] 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.