Skip to content

Modality.Value.Const should behave like a product #3961

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

Draft
wants to merge 1 commit into
base: clean-up-mode-axis-gadt
Choose a base branch
from

Conversation

riaqn
Copy link
Contributor

@riaqn riaqn commented May 2, 2025

Based on #3949

This PR refactors the interface of Modality.Value.Const to make it behave like a product of axes (that you can project and update specific axis) instead of a sequence of atoms (that you compose).

This allows other incoming PRs that do the following:

  • remove [@no_mutable_implied_modalities], since we can spell out modalities to override those
  • fix the behavior of default modalities, so the overriding is per-axis.
  • warnings for specifying the same modality axis multiple times in a single modality expression.
  • warnings for superfluous overriding (e.g., overriding portable with portable)

Review

@dkalinichenko-js , could you look at the changes in typemode.ml and tests. In particular, could you check that the implication and the print back is still as expected. Feel free to add more tests.

@riaqn riaqn requested a review from dkalinichenko-js May 2, 2025 13:47
@riaqn riaqn marked this pull request as draft May 2, 2025 14:06
@riaqn riaqn force-pushed the refactor-modality-const-repr branch from 2f81160 to f37af34 Compare May 2, 2025 17:29
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