Skip to content

Module parameter names should have its own type #3172

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

Closed
wants to merge 1 commit into from

Conversation

riaqn
Copy link
Contributor

@riaqn riaqn commented Oct 22, 2024

Based on #1726

Uses the fact that parameters can't be parameterized, and encode that info in the types. This can help remove some assert false in the code.

This will be picked up by @lukemaurer when he has time.

imp_params : Global_module.Parameter.t list;
imp_arg_for : Global_module.Parameter.t option;
imp_impl : CU.t;
imp_raw_sign : Signature_with_global_bindings.t;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Discussed offline - we think it's simpler to lift this out to be under import directly.

if need_local_ident penv global
match kind with
| Parameter param ->
if is_registered_parameter_import penv modname then
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Discussed offline, this would raise error if we are compiling a parameter.

| Parameter of Global_module.Parameter.t
| Normal of {
pn_global : Global_module.t;
pn_arg_for : Global_module.Parameter.t option;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Discussed offline - this can be removed.

@riaqn riaqn changed the title unfinished, distinguish Parameter.t Module parameters should have its own type Oct 23, 2024
@riaqn riaqn changed the title Module parameters should have its own type Module parameter names should have its own type Oct 23, 2024
@mshinwell mshinwell added the parameterized-libs PRs needed for parameterized libraries label Oct 24, 2024
@riaqn
Copy link
Contributor Author

riaqn commented May 21, 2025

superseded by #3708

@riaqn riaqn closed this May 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
parameterized-libs PRs needed for parameterized libraries
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants