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

Duplicate bindings not discovered at parse-time #154

Open
pdarragh opened this issue Nov 30, 2023 · 0 comments
Open

Duplicate bindings not discovered at parse-time #154

pdarragh opened this issue Nov 30, 2023 · 0 comments

Comments

@pdarragh
Copy link
Contributor

In Racket, duplicate bindings in a let are a syntax error:

> (let ([x 1] [x 2]) x)
string:1:13: let: duplicate identifier
  at: x
  in: (let ((x 1) (x 2)) x)
 [,bt for context]

We don't perform these checks during parsing, though, and instead wait until interpretation or compilation to discover the issue. Historically this has been fine because we simply don't test syntactically invalid inputs.

However, as we continue to implement competitive elimination assignments with reference machines, it becomes important to improve the underlying implementations. I think it would be best if we incorporate checks for this in the parser going forward.

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

No branches or pull requests

1 participant