jaredly / jaredly/reason-language-server
Destructive Substitution / "module type of" formatting is wrong
Nobody has claimed this yet.
- Dominant language
- OCaml
- Stars
- 649
- Forks
- 85
- PR merge metrics
- No merged PRs in 30d
Description
This syntax:
```
include (
SomeModule:
(module type of SomeModule) with type t('a) := SomeModule.t('a)
);
```
Gets mangled into this "ofSomemodule" with space removed:
```
include (
SomeModule:
(module type ofSomeModule) with type t('a) := SomeModule.t('a)
);
```
This works:
```
include (SomeModule: (module type of SomeModule));
```
bs-platform version 8.2.0.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the formatter output with the nested `include` example from the issue, then compare it with the working one-line form. Trace the formatting path for `(module type of SomeModule)` and verify that the corrected output preserves the space before `SomeModule`; done means both examples format without changing their syntax.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ocaml
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100