reasonml / reasonml/reason

Invalid code generated from valid OCaml interface code

Open
#2,445 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Printer
Dominant language
OCaml
Stars
10.3k
Forks
438
PR merge metrics
No merged PRs in 30d

Description

Input (interface file):

val foo: int
[@@a val bar: string [@@b]]

Output:

[@a [@b] external bar: string = ]
let foo: int;

I believe the output should be:

[@a [@b] let bar: string; ]
let foo: int;

Version: Reason 3.5.0 @ 8ee1ff66

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 conversion using the OCaml interface and expected Reason snippets in the issue, then trace the interface-code conversion entry point that handles attributes and external declarations. Done means the shown input produces a Reason let declaration for bar with both attributes preserved, without the invalid external syntax.

Written by the indexing model from the issue text.

Assessment

Tech stack
ocaml
Domain
compilers
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.