-
Notifications
You must be signed in to change notification settings - Fork 9
Eliminate annotated parameter #188
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
base: main
Are you sure you want to change the base?
Conversation
hansjoergschurr
left a comment
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.
Looks great
src/type_checker.cpp
Outdated
| // point. | ||
| if (!match(hdt, ctypes[i], ctx, visited)) | ||
| bool isQuote = false; | ||
| bool success = true; |
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.
is success the right variable name here? maybe there could be a more descriptive name?
|
I've made some updates to simplify things further, PTAL. |
This refactors how parameters in
declare-parameterized-constare interpreted.In particular, we determine if the parameter is used in the return type. If yes, we ensure its type is ground. If not, it is treated as an ordinary function argument.
For the former, this disallows a definition like:
This furthermore eliminates ANNOT_PARAM, and adds an additional check to ensure that quoted arguments match the type of the provided argument.
Furthermore removes some unused portions of the code, including type check interface for plugins and the
:requiresannotation for parameters.