-
Notifications
You must be signed in to change notification settings - Fork 790
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
(Empty/NoEmpty)-bodied named computation expression should produce the same AST #18126
(Empty/NoEmpty)-bodied named computation expression should produce the same AST #18126
Conversation
Yeah, the only downsides to this approach I noted in the RFC were:
|
Thanks @brianrourkeboll. Im thinking that if we are already re-writing the Untyped AST during type checking . We can do that in the parser so we avoid the rewrite part ?. |
Yeah sorry, I didn't mean to imply that doing it in the parser was categorically bad. Those were just the reasons why I chose not to modify the parser in the RFC. I see that Florian has a potential solution to fsprojects/fantomas#3140 in fsprojects/fantomas#3141, but if we wanted to be more explicit — and since it looks like AST consumers need to update their handling of this scenario regardless — another alternative would be this:
For maximum accuracy, we could even add something like SynExpr.EmptyRecordOrComputationExpr of range: range :) |
❗ Release notes requiredCaution No release notes found for the changed paths (see table below). Please make sure to add an entry with an informative description of the change as well as link to this pull request, issue and language suggestion if applicable. Release notes for this repository are based on Keep A Changelog format. The following format is recommended for this repository:
If you believe that release notes are not necessary for this PR, please add NO_RELEASE_NOTES label to the pull request. You can open this PR in browser to add release notes: open in github.dev
|
Thanks Brian. Yeah updating |
7c2e307
to
c01e9a9
Compare
…edgarfgp/fsharp into treat-empy-bodied-named-comp-expr-as-ce
Description
Investigating if it is feasible to produce the same AST for (Empty/NoEmpty)-bodied named computation expression
Fantomas
Fixes # (issue, if applicable)
Checklist