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

refactor decl grammar to be more Rust like #44

Open
2 of 5 tasks
nikomatsakis opened this issue May 31, 2022 · 1 comment
Open
2 of 5 tasks

refactor decl grammar to be more Rust like #44

nikomatsakis opened this issue May 31, 2022 · 1 comment
Labels
meta A tracking issue (an issue about issues)

Comments

@nikomatsakis
Copy link
Contributor

nikomatsakis commented May 31, 2022

I've been pondering the "decl layer". I think it might be a bit more readable if we made efforts to make it a touch more Rust like.

I thought we could collect ideas here in this tracking issue.

@nikomatsakis nikomatsakis added the meta A tracking issue (an issue about issues) label May 31, 2022
@nikomatsakis
Copy link
Contributor Author

nikomatsakis commented Jun 1, 2022

Some examples that came up in discussion today:

To represent static S: Foo = f-body, instead of

(StaticDecl (term (S (static () () (rigid-ty Foo ()) fn-body))))

we could do

(StaticDecl (term (static S () : (rigid-ty Foo ()) = fn-body where ())))

Note that this syntax supports generic statics/consts with where-clauses :)

@nikomatsakis nikomatsakis mentioned this issue Jun 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
meta A tracking issue (an issue about issues)
Projects
None yet
Development

No branches or pull requests

1 participant