syntax error with variants that have record parameters
Nobody has claimed this yet.
- Dominant language
- Reason
- Stars
- 202
- Forks
- 6
- PR merge metrics
- No merged PRs in 30d
Description
This code:
```reasonml
type bar = {x: int};
type event =
| Foo(int)
| Bar(bar);
```
Generates this output, which has a syntax error:
```reasonml
module Types1 = {
type _Lib__Events__event =
Lib__Events.event = | Foo(int) | Bar(_lib__Events__bar)
and _lib__Events__bar = lib__Events.bar = {x: int};
};
```
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 Reason snippet and inspect the generator entry point that produces the shown module output. The fix is complete when variants with record parameters generate syntactically valid Reason/OCaml code and the reproduced example parses successfully.
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
- 38/100