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

Possible macro hygiene interference with ..k match clause expansion #3435

Open
zyrolasting opened this issue Oct 11, 2020 · 3 comments
Open
Labels
bug Something isn't working correctly

Comments

@zyrolasting
Copy link
Contributor

zyrolasting commented Oct 11, 2020

What version of Racket are you using?
7.7.0.5

What program did you run?

(let ([a 1]) (match (list a a a) [(list a a ..1) #t] [_ #f]))

What should have happened?

I expected #t, which would be consistent with:

(let ([a 1]) (match (list a a a) [(list a a a) #t] [_ #f]))

If you got an error message, please include it here.

a247: unbound identifier;, where 247 is circumstantial.

Please include any other relevant details

  • Fedora 30.
  • When reproducing in the REPL, the error will also mention that #%top is not bound.
  • The error reproduces for both __k and ..k patterns
  • The error does not reproduce if only one bound identifier appears in the match clause. This is what makes me suspect macro hygiene is related.
    (let ([a 1]) (match (list a a a) [(list a ..1) #t] [_ #f]))
@samth
Copy link
Sponsor Member

samth commented Oct 11, 2020

See also #3425

@samth
Copy link
Sponsor Member

samth commented Oct 11, 2020

This isn't a macro hygiene issue -- it's a bug in how match generates the equality comparison in the presence of repetition.

@zyrolasting
Copy link
Contributor Author

zyrolasting commented Oct 11, 2020

Thank you for clarifying! Please feel free to close if this thread does not contribute any new information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly
Projects
None yet
Development

No branches or pull requests

3 participants