reasonml / reasonml/reason

Support attributes on labeled, punned arguments.

Open
#2,317 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

let f = (~named as [@labeledArgPunned] named) => 0;
let f = (~named as  [@labeledArgPunned]  named : int) => 0;

Can be equivalent to:

let f = ([@labeledArgPunned] ~named) => 0;
let f = ([@labeledArgPunned] ~named : int) => 0;

(They must have the same AST representation because there is no concept of punning in the AST - it exists only at parse/print time).

Question: How should types appear?

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

The issue provides parser examples but names no files, tests, or entry points. First determine where labeled, punned arguments and their types are parsed and printed, then establish the intended representation and add coverage for both examples.

Written by the indexing model from the issue text.

Assessment

Tech stack
ocaml
Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.