Support annotations inside function definitions.
Nobody has claimed this yet.
- Dominant language
- OCaml
- Stars
- 10.3k
- Forks
- 438
- PR merge metrics
- No merged PRs in 30d
Description
This is currently supported:
[@genType]
let renameABunch = ~pad =>
[@genType.as "xRenamed"] (~x) => [@genType.as "yRenamed"] (~y) => pad+x+y;
and gets formatted to:
let renameABunch = ~pad =>
[@genType.as "xRenamed"]
((~x) => [@genType.as "yRenamed"] ((~y) => pad + x + y));
Ideally, it could look like this:
[@genType]
let renameABunch = (~pad, [@genType.as "xRenamed"] ~x, [@genType.as "yRenamed"] ~y) => pad + x + y;
For more background: https://github.com/cristianoc/genType/issues/75.
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
Start by comparing the current and desired formatting examples in this issue, then read the linked genType issue for background on the annotations. Identify the formatter entry point that handles function definitions and verify the change against examples containing annotations on parameters and nested functions; done means the desired form is produced without regressing the currently supported form.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ocaml
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 28/100