Skip to content

prototype(menhir): infer through a private alias interface - #199

Closed
anmonteiro wants to merge 8 commits into
mainfrom
prototype/menhir-inference-alias-cmi
Closed

anmonteiro wants to merge 8 commits into
mainfrom
prototype/menhir-inference-alias-cmi

Conversation

@anmonteiro

Copy link
Copy Markdown
Owner

Alternative prototype for ocaml#8989, based directly on main for comparison with #195. Re-export enclosing aliases through a private CMI and anonymously open it during inference, retaining ordinary logical dependency lookup without -as-map or dependency object-name resolution.

Reuses the compatibility tests from ocaml#16452. Leaves #195 unchanged.

@anmonteiro
anmonteiro force-pushed the prototype/menhir-inference-alias-cmi branch 2 times, most recently from 8281966 to 39518e1 Compare September 24, 2026 06:07
@anmonteiro
anmonteiro force-pushed the prototype/menhir-inference-alias-cmi branch 2 times, most recently from 3b72241 to 3462170 Compare September 26, 2026 05:11
Extract the alias group lookup from fold_no_vlib_with_aliases for reuse
in ocaml#16464. No behavior changes.

Signed-off-by: Antonio Nuno Monteiro <[email protected]>
Compile a private CMI re-exporting enclosing alias scopes, and anonymously open it in the query before preprocessing. Keep ordinary logical dependency lookup and final parser compilation unchanged.

Alternative to #195 for ocaml#8989. Cover helper-name collisions and snapshot the generated interface and logical dependencies.

Signed-off-by: Antonio Nuno Monteiro <[email protected]>
Signed-off-by: Antonio Nuno Monteiro <[email protected]>
Use Module_name.wrap for helper names and check only enclosing aliases for guards, reusing the existing virtual-library-aware group lookup.

Signed-off-by: Antonio Nuno Monteiro <[email protected]>
@anmonteiro
anmonteiro force-pushed the prototype/menhir-inference-alias-cmi branch from afdc8be to b6a2c56 Compare September 26, 2026 22:52
anmonteiro added a commit to ocaml/dune that referenced this pull request Sep 27, 2026
Fix Menhir inference for qualified module group interfaces by opening a
private alias interface, preserving logical dependency lookup.

Fixes #8989. Continues anmonteiro#199; alternative to #16427 and
anmonteiro#195.

---------

Signed-off-by: Antonio Nuno Monteiro <[email protected]>
@anmonteiro

Copy link
Copy Markdown
Owner Author

Superseded by ocaml#16464, now merged upstream.

@anmonteiro anmonteiro closed this Sep 27, 2026
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.

1 participant