Skip to content
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

Recursive defsyntax expands infinitely #93

Open
noprompt opened this issue Dec 19, 2019 · 0 comments
Open

Recursive defsyntax expands infinitely #93

noprompt opened this issue Dec 19, 2019 · 0 comments
Assignees

Comments

@noprompt
Copy link
Owner

Consider

(m/defsyntax static
  ([]
   `(m/or ('quote _)
          (m/pred number?)
          (m/pred keyword?)
          [(static) ...])))

This syntax extension will be expanded to point of a StackOverflowError, however, it should be possible to avoid this. Since m/with allows for recursive definitions we should be able to rewrite the body of the syntax extension in terms of m/with such that the recursive semantics are preserved and without causing a StackOverflowError at compile time.

@noprompt noprompt changed the title Recursive defsyntax expand infinitely Recursive defsyntax expands infinitely Dec 19, 2019
@noprompt noprompt self-assigned this Dec 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant