a-mir-formality
a-mir-formality copied to clipboard
refactor decl grammar to be more Rust like
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.
- [x] #45
- [x] #46
- [ ] embed item names in the declarations
- [ ] make
Selftype parameter implicit on traits - [ ] #21
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 :)