-
Notifications
You must be signed in to change notification settings - Fork 87
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
base: main
Are you sure you want to change the base?
Conversation
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 | ||
``` |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
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.