Skip to content

Conversation

@ajreynol
Copy link
Member

@ajreynol ajreynol commented Dec 2, 2025

This refactors how parameters in declare-parameterized-const are 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:

(declare-parameterized-const id ((T Type :implicit) (x T)) Type)
(declare-parameterized-const bad ((T Type :implicit) (x T)) (-> T (id x)))

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 :requires annotation for parameters.

@ajreynol ajreynol changed the title Refactor annotated parameter Eliminate annotated parameter Dec 2, 2025
@ajreynol ajreynol added draft and removed draft labels Dec 2, 2025
@ajreynol ajreynol removed the draft label Dec 16, 2025
Copy link
Collaborator

@hansjoergschurr hansjoergschurr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great

// point.
if (!match(hdt, ctypes[i], ctx, visited))
bool isQuote = false;
bool success = true;
Copy link
Collaborator

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?

@ajreynol
Copy link
Member Author

I've made some updates to simplify things further, PTAL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants