-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Term rewriting macros being applied repeatly #2901
Comments
I can reproduce this even today. Evaluating the code block in https://nim-lang.org/docs/manual.html#pattern-operators-the-operator gives "3" instead of "2". |
This is somehow implicitly stated in the manual when it mentions
The blind swap would get into an infinite loop. As far as I can tell, this is the intended behaviour (and I think this is right: applying an optimization can trigger more optimizations), so it should just be mentioned in the manual more explicitly |
The example listed in http://nim-lang.org/docs/manual.html#term-rewriting-macros-pattern-operators
outputs
3
, because the templatet
is applied repeatly. I see bothusecases where you have a repeated application and and where you
don't, how should this be solved?
At least the documentation needs to be fixed.
The text was updated successfully, but these errors were encountered: