Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support renaming fields in inline records #6391

Merged
merged 4 commits into from
Sep 7, 2023

Conversation

tatchi
Copy link
Contributor

@tatchi tatchi commented Sep 7, 2023

Extracted from melange-re/melange#732

Copy link
Collaborator

@cristianoc cristianoc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for doing this!
Checked, and gentype was already supporting this, so no adaptation required there.

@cristianoc cristianoc merged commit 6390057 into rescript-lang:master Sep 7, 2023
@tatchi
Copy link
Contributor Author

tatchi commented Sep 7, 2023

Btw the original PR also add support for

exception UserException({@as("renamed") name: string})

But this code doesn't parse in rescript (syntax error). Is it something we should support ?

@zth
Copy link
Collaborator

zth commented Sep 7, 2023

@tatchi it's possible this PR might add support for that as a bi effect: #6326

I got stuck and haven't had time to pick that up again. Let me know if that's something you'd be interested in continuing.

@tsnobip
Copy link
Contributor

tsnobip commented Oct 13, 2023

unfortunately it seems that this PR only works for creating such variants but not for accessing those fields. cf #6438

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants