-
Notifications
You must be signed in to change notification settings - Fork 430
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
Unnecessarily wraps an anonymous fun function in parens #2032
Labels
KIND: FEATURE REQUEST
Printer
things that have to do with turning an AST into Reason code
SKILL: VERY DIFFICULT
Comments
Thanks for reporting. I'm fixing this one. |
anmonteiro
added a commit
to anmonteiro/reason
that referenced
this issue
Jun 30, 2018
fixes reasonml#2032 before: ```reason let predicate = predicate === Functions.alwaysTrue1 ? defaultPredicate : ( fun | None => false | Some(exn) => predicate(exn) ); ``` after: ```reason let predicate = predicate === Functions.alwaysTrue1 ? defaultPredicate : fun | None => false | Some(exn) => predicate(exn); ```
anmonteiro
added a commit
to anmonteiro/reason
that referenced
this issue
Jul 2, 2018
fixes reasonml#2032 before: ```reason let predicate = predicate === Functions.alwaysTrue1 ? defaultPredicate : ( fun | None => false | Some(exn) => predicate(exn) ); ``` after: ```reason let predicate = predicate === Functions.alwaysTrue1 ? defaultPredicate : fun | None => false | Some(exn) => predicate(exn); ```
anmonteiro
added a commit
to anmonteiro/reason
that referenced
this issue
Jul 6, 2018
fixes reasonml#2032 before: ```reason let predicate = predicate === Functions.alwaysTrue1 ? defaultPredicate : ( fun | None => false | Some(exn) => predicate(exn) ); ``` after: ```reason let predicate = predicate === Functions.alwaysTrue1 ? defaultPredicate : fun | None => false | Some(exn) => predicate(exn); ```
anmonteiro
added a commit
to anmonteiro/reason
that referenced
this issue
Jul 29, 2018
fixes reasonml#2032 before: ```reason let predicate = predicate === Functions.alwaysTrue1 ? defaultPredicate : ( fun | None => false | Some(exn) => predicate(exn) ); ``` after: ```reason let predicate = predicate === Functions.alwaysTrue1 ? defaultPredicate : fun | None => false | Some(exn) => predicate(exn); ```
chenglou
pushed a commit
that referenced
this issue
Aug 9, 2018
* Unnecessarily wraps an anonymous fun function in parens fixes #2032 before: ```reason let predicate = predicate === Functions.alwaysTrue1 ? defaultPredicate : ( fun | None => false | Some(exn) => predicate(exn) ); ``` after: ```reason let predicate = predicate === Functions.alwaysTrue1 ? defaultPredicate : fun | None => false | Some(exn) => predicate(exn); ``` * add more test cases and fix precedence in the presence of infix operators * even more test cases, demonstrating ternary + infix bind
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
KIND: FEATURE REQUEST
Printer
things that have to do with turning an AST into Reason code
SKILL: VERY DIFFICULT
gets refmt'd to:
Notice the additional unnecessary parens.
The text was updated successfully, but these errors were encountered: