Skip to content

Make the unerasable optional argument warning stricter to enforce semantics#12739

Open
garrigue wants to merge 6 commits intoocaml:trunkfrom
COCTI:strict_unerasable_optional_warning
Open

Make the unerasable optional argument warning stricter to enforce semantics#12739
garrigue wants to merge 6 commits intoocaml:trunkfrom
COCTI:strict_unerasable_optional_warning

Conversation

@garrigue
Copy link
Copy Markdown
Contributor

As discussed in #10653, the current compilation scheme only preserves the strict-eager semantics of partial application if all optional arguments are followed by an unlabeled one in the same n-ary abstraction.
This PR modifies warning 16 to enforce this.
It will trigger for lablgtk, and maybe some other libraries which make un-orthodox use of optional arguments, but it clarifies the semantics.
Only merge after discussion.

@gasche gasche added typing semantics runtime/operational/dynamic semantics of OCaml programs labels Nov 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

semantics runtime/operational/dynamic semantics of OCaml programs typing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants