You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current user manual (for version 1.19.12) has this to say about parametrized productions
A drawback of the current implementation is that it does not support type signatures for the parameterized productions, that depend on the types of the parameters. We plan to implement that in the future---the current workaround is to omit the type signatures for such rules.
This is flat out wrong. Parametrized productions have (for at least several versions) supported type signatures. Examples:
many(a) :: { [a] }
: { [] }
| some_rev(a) { reverse $1 }
some_rev(a) :: { [a] }
: a { [$1] }
| some_rev(a) a { $2 : $1 }
then(a, b) :: { (a,b) }
: a b { ($1, $2) }
To fix:
add a regression test case to make sure this is not broken in future versions
add an example to examples for this
update the user manual
This is somewhat important since there is also bad advice floating about the internet suggesting people use _ to work around this (see #141 for instance).
The text was updated successfully, but these errors were encountered:
The current user manual (for version 1.19.12) has this to say about parametrized productions
This is flat out wrong. Parametrized productions have (for at least several versions) supported type signatures. Examples:
To fix:
examples
for thisThis is somewhat important since there is also bad advice floating about the internet suggesting people use
_
to work around this (see #141 for instance).The text was updated successfully, but these errors were encountered: