Open
Description
In the specification, a function type with by-value paramters is defined as such:
Type ::= ‘(’ [‘=>’ Type] ‘)’ ‘=>’ Type
| ...
In practice, the compiler accepts types such as:
(=>int, =>int) => int
It is a bit tricky to have the specification fit the implementation properly because the grammar for a non-by-value parameter list is part of SimpleType
(and shares a production with tuple types):
SimpleType ::= ‘(’ Types [‘,’] ’)’
| ...
Wich means the by-value marker =>
cannot be added there.
It isn't pretty, but the rule for Type may be changed to:
Type ::= ‘(’ [‘=>’ Type {‘,’ [‘=>’] Type}] ‘)’ ‘=>’ Type
| ...
This issue is a sub-element of #233.
This issue is related to #238.