Skip to content

Support modules of non-legacy modes #3759

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Support modules of non-legacy modes #3759

wants to merge 3 commits into from

Conversation

riaqn
Copy link
Contributor

@riaqn riaqn commented Mar 27, 2025

Based on #3757 and #3758 and #3824

This PR adds the support for modules of non-legacy modes. Functor parameter and body are still fixed to be legacy.

TODO:

  • Improve inclusion error messages
  • Add tests reflecting subtle code changes in type checking
  • Add tests showing functor application mode error message

The room for improvement shouldn't block preliminary review and discussion. In particular, changes to the existing tests seem correct, and can serve as a good starting point.

@riaqn riaqn requested a review from lukemaurer March 27, 2025 17:24
@riaqn riaqn added typing modes Work on modes. There's some overlap with the `multicore` label, but not strictly so. labels Mar 27, 2025
@riaqn riaqn force-pushed the modal-module branch 4 times, most recently from eefebc5 to 2f89dc6 Compare April 4, 2025 16:59
@riaqn riaqn changed the base branch from main to minor-fix-modes April 8, 2025 13:43
Copy link
Collaborator

@goldfirere goldfirere left a comment

Choose a reason for hiding this comment

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

Took a quick look at the tests, just to understand the design better. Looks good to me, just a few comments as I was scrolling through.

Copy link
Contributor

@lukemaurer lukemaurer left a comment

Choose a reason for hiding this comment

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

Still not entirely reviewed but just have env.ml and env.mli left.

@riaqn riaqn force-pushed the minor-fix-modes branch 2 times, most recently from 7ac004d to b89cf95 Compare May 26, 2025 10:14
Base automatically changed from minor-fix-modes to main June 3, 2025 17:23
@goldfirere
Copy link
Collaborator

I've resolved my Discussions on this PR

Copy link
Contributor

@lukemaurer lukemaurer left a comment

Choose a reason for hiding this comment

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

Looks good, other than I think it should say “escapes its region” rather than “escapes region”

@riaqn riaqn force-pushed the modal-module branch 2 times, most recently from 6a6f258 to 3030775 Compare June 17, 2025 14:37
@riaqn riaqn force-pushed the modal-module branch 2 times, most recently from e24a7fe to 9af2554 Compare June 25, 2025 13:20
@riaqn
Copy link
Contributor Author

riaqn commented Jun 27, 2025

@lukemaurer can you review the new commits:

post rebase fix

include should rebase modalities

change how extension level affects modalities

improve comments

change error message

Copy link
Contributor

@lukemaurer lukemaurer left a comment

Choose a reason for hiding this comment

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

All good, up to a few comment tweaks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
modes Work on modes. There's some overlap with the `multicore` label, but not strictly so. typing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants