Skip to content

Clarify and expand modes syntax docs #3943

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

Conversation

goldfirere
Copy link
Collaborator

I was reading through this on my way to somewhere else and made some edits.

Review: @riaqn, who I have also requested to add an entry that I don't feel qualified to do myself.

@goldfirere goldfirere requested a review from riaqn April 29, 2025 16:55
Comment on lines +39 to 45
A mode expression actually contains a specification for each modal axis, whether
you have written a choice for that axis or not. For axes that are omitted, the
so-called *legacy* modes are used instead. The legacy modes are as follows:

```ocaml
global aliased many nonportable uncontended unyielding stateful read_write
```
Copy link
Contributor

Choose a reason for hiding this comment

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

This is only true for modes on arrow types. But I think maybe better to move this to another document about semantics.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Really? There are contexts where these aren't the legacy modes?

Not sure whether this is syntax or semantics. I've always thought of the legacy modes as just syntax ("when you don't specify an axis in a mode expression, you get this one"), but I suppose it also plays into what's accepted in modules, etc.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah when you write (exp : _ @ local) you are only specifying the locality; the rest are not constrained.

@riaqn riaqn mentioned this pull request May 1, 2025
3 tasks
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.

2 participants