You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The original metaprogramming paper: https://hackmd.io/Tkzo_ryvTsWMPESmWHPiZw?view detailed a meta-circular evaluator architecture to expand macros, however after much experimentation this was more difficult than it seemed.
Happy Case
As an alternative to the meta-circular evaluator, we can implement an elaborator which combines name resolution, type checking, and comptime interpretation into one pass. Since each expression will be name resolved, type checked, and evaluated simultaneously, code that is expanded from a macro can be treated as normal code to be elaborated next.
This would replace our type checking, name resolution, and comptime scanning passes.
Project Impact
None
Impact Context
No response
Workaround
None
Workaround Description
No response
Additional Context
No response
Would you like to submit a PR for this Issue?
None
Support Needs
No response
The text was updated successfully, but these errors were encountered:
…or` flag is specified (#5145)
# Description
## Problem\*
Resolves#5146
Fixes all failing frontend tests with the elaborator
## Summary\*
This PR includes a few fixes:
- Use `check_trait_impl_method_matches_declaration` to issue errors when
a trait impl method is declared with an incorrect signature.
- `define_function_meta` for default trait functions on impls when
they're copied over. Also make sure to set `self.current_trait_impl` and
`self.self_type` for them as well.
- Use `try_get_trait_implementation` when getting a trait impl may fail
(which may happen if there was a previous error resolving the trait for
that impl). This was triggering on the test where we tried to declare a
trait impl implementing a struct rather than a trait.
- `check_trait_wrong_parameter_type` has a duplicate error on master but
not in the elaborator so I changed the expected error count there.
## Additional Context
After this PR all existing code _should_ work with the elaborator and we
can get the word out to get others testing the `--use-elaborator` flag
for any errors/panics.
## Documentation\*
Check one:
- [x] No documentation needed.
- [ ] Documentation included in this PR.
- [ ] **[For Experimental Features]** Documentation to be submitted in a
separate PR.
# PR Checklist\*
- [x] I have tested the changes locally.
- [x] I have formatted the changes with [Prettier](https://prettier.io/)
and/or `cargo fmt` on default settings.
Problem
The original metaprogramming paper: https://hackmd.io/Tkzo_ryvTsWMPESmWHPiZw?view detailed a meta-circular evaluator architecture to expand macros, however after much experimentation this was more difficult than it seemed.
Happy Case
As an alternative to the meta-circular evaluator, we can implement an elaborator which combines name resolution, type checking, and comptime interpretation into one pass. Since each expression will be name resolved, type checked, and evaluated simultaneously, code that is expanded from a macro can be treated as normal code to be elaborated next.
This would replace our type checking, name resolution, and comptime scanning passes.
Project Impact
None
Impact Context
No response
Workaround
None
Workaround Description
No response
Additional Context
No response
Would you like to submit a PR for this Issue?
None
Support Needs
No response
The text was updated successfully, but these errors were encountered: