Skip to content

Conversation

@toddjonker
Copy link
Member

At present things like (when if ...) are legal syntax, with the if interpreted as a variable reference bound to to an unusable internal value. This is quite wrong, but the behavior was used in a couple places.

Fixes #126


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

At present things like `(when if ...)` are legal syntax, with the `if` interpreted as a variable reference bound to to an unusable internal value. This is quite wrong, but the behavior was used in a couple places.

Fixes ion-fusion#126
This needs to be in a separate module because `define_syntax` bodies are compiled before `define`s are expanded, so they cannot reference helpers from the same module.  Racket has `define_for_syntax` to create helpers at the correct expansion phase.
@toddjonker toddjonker merged commit 8ab3557 into ion-fusion:main Dec 20, 2025
4 checks passed
@toddjonker toddjonker deleted the no-macro-ids branch December 20, 2025 01:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Raise syntax error when a macro binding is used as a variable reference

2 participants