jaredly / jaredly/milk

syntax error with variants that have record parameters

Open
#2 4 comments 0 reactions 0 assignees View on GitHub

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.