-
-
Notifications
You must be signed in to change notification settings - Fork 320
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
Canonicalize and type check module params #6861
Conversation
No reporting yet
1d0cf4a
to
c3885c8
Compare
The theory is that this will be more searchable
Thank you for your contribution! Sometimes PRs end up staying open for a long time without activity, which can make the list of open PRs get long and time-consuming to review. To keep things manageable for reviewers, this bot automatically closes PRs that haven’t had activity in 60 days. This PR hasn’t had activity in 30 days, so it will be automatically closed if there is no more activity in the next 30 days. Keep in mind that PRs marked |
@ayazhafiz I"m planning to make another PR for module params this week that depends on this. Do you think this is in a mergeable state? I addressed every comment you made on the initial review, but let me know if you have more. |
@agu-z I would only suggest considering how these will be compiled, since that might change the implementation, but lgtm! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😃
I"ll try do a bit of investigating this week on the test failure and we can ignore it if I don"t make progress. |
Just going to repeat the error here so it comes if we search for it in the future:
|
Signed-off-by: Anton-4 <[email protected]>
Signed-off-by: Anton-4 <[email protected]>
…o typecheck-module-params
I switched that workflow over to using nix and it passed 🎉 |
We will now canonicalize module param expressions in imports and create defs for them. When a value symbol is looked up, the scope will also return the params def"s symbol if it exists, so we can later extend function calls with it (not included in this PR).
New warnings are introduced for when a module expects params but none are provided, or when some are provided but none are expected. Finally, we will fully type check params in imports against the pattern in the module definition.
CleanShot.2024-07-02.at.10.36.29.mp4
Note: Ability implementations cannot use values from params yet. I decided to postpone this because I"m not sure how to support this, and it seems like a rare case.