-
Notifications
You must be signed in to change notification settings - Fork 39
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
Various fixes and improvements to module linting #95
Merged
Commits on Nov 1, 2022
-
Configuration menu - View commit details
-
Copy full SHA for a678b03 - Browse repository at this point
Copy the full SHA a678b03View commit details -
ocaml syntax: fix contained
functor
- do not require space before `functor` - do not match `functorx` as `functor x` For precedence reasons, `ocamlMPRestr2` must then be declared after `ocamlMPRestr3`.
Configuration menu - View commit details
-
Copy full SHA for 39856d6 - Browse repository at this point
Copy the full SHA 39856d6View commit details -
ocaml syntax: fix contained
sig
- do not require space before contained `sig` - do not match `sigx` as `sig x` For precedence reasons, `ocamlMPRestr1` must then be declared after `ocamlMPRestr3`.
Configuration menu - View commit details
-
Copy full SHA for c987f09 - Browse repository at this point
Copy the full SHA c987f09View commit details -
ocaml syntax: dedup ocamlSig / ocamlMPRestr1
for precedence reasons, ocamlSig must be declared after ocamlMPRestr3
Configuration menu - View commit details
-
Copy full SHA for a7eec51 - Browse repository at this point
Copy the full SHA a7eec51View commit details -
ocaml syntax: dedup ocamlStruct / ocamlFuncStruct
also, minor fix: do not require a character before `struct` when nested in parentheses; this fixes the following example: open F( struct end )
Configuration menu - View commit details
-
Copy full SHA for 175ed43 - Browse repository at this point
Copy the full SHA 175ed43View commit details -
ocaml syntax: dedup ocamlMPRestr3 / ocamlModTypeRestr
(but what is that for?)
Configuration menu - View commit details
-
Copy full SHA for 524c540 - Browse repository at this point
Copy the full SHA 524c540View commit details -
Configuration menu - View commit details
-
Copy full SHA for 60e70f4 - Browse repository at this point
Copy the full SHA 60e70f4View commit details -
ocaml syntax: fix linting of
functor
and functor paramsThe `module` keyword is now treated uniformly. Previously, it was matched differently in signatures (matchgroup `ocamlModSpec`) than elsewhere (matchgroup `ocamlModule`). Both cases have almost identical syntax: (* in signatures: *) module M (X1 : T1) … (Xn: Tn) : MODULE TYPE (* in structures: *) module M (X1 : T1) … (Xn: Tn) [: MODULE TYPE] = MODULE DEF The case distinction was not taking profit of the small difference in syntax, and it was creating complexity and mismatch between both cases. Each case had shortcomings. In signatures, functor parameters like this where not highlighted corrrectly: (* in signatures: *) module M (X1 : T1) : … Also, the only case where the `functor` keyword was highlighted correctly was in a `module` type annotation *in a signature*. It was not highlighted correctly in `module` type annotations *in structures*, nor in `module` definitions, nor in `module type` definitions. (* in signatures: *) module type T = functor (X1 : T1) -> … module M : functor (X1 : T1) -> … (* the only case that was working *) (* in structures: *) module type T = functor (X1 : T1) -> … module M : functor (X1 : T1) -> … = … module M = functor (X1 : T1) -> … These bugs are now fixed. The `ocamlModule` matchgroup subsumes the features of both former cases (`module` in signatures / in structures). The `functor` keyword is no more "contained", so that it now matches in all of the 5 situations above.
Configuration menu - View commit details
-
Copy full SHA for 4f39941 - Browse repository at this point
Copy the full SHA 4f39941View commit details -
ocaml syntax: rename some matchgroups relating to modules
(those I could make sense of)
Configuration menu - View commit details
-
Copy full SHA for 72cf1d6 - Browse repository at this point
Copy the full SHA 72cf1d6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 577635a - Browse repository at this point
Copy the full SHA 577635aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0676496 - Browse repository at this point
Copy the full SHA 0676496View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.