-
Notifications
You must be signed in to change notification settings - Fork 38
Fix several printing issues with async
including an infinite loop.
#680
Conversation
The same code paths relevant for this also have an infinite loop: #681 |
The infinite loop happens when the expression is returned unchanged. Now checking that some progress is made. Fixes #681
async
including an infinite loop.
The pattern matching inside |
Just trying to respect what seem to be the existing conventions. And yes it looks complicated. The attributes I think can be used in JSX to specify |
In user space? Not that I know. The attribute for arg is mainly used in |
In order to make the pattern matching more simple, then I look through several cases of attributes with fun args. I found something strange between labeled and nolabel arg. let f7 = (@attr ~a, @attr ~b) => ()
let f8 = (@attr a, @attr b) => ()
Can we parse the attributes for arg to the |
The one thing I'm really not sure about is why labelled and unlabelled args are treated differently. Also, this let f12 = @a (@b x) => 3 formats to let f12 = @a x => 3 |
I think we need to check this decision history. |
Yes this makes sense, and should respect the intent of the original code. Basically attributes outside Is this ^ what you have in mind? |
Exactly! |
I suspect the distinction was not really intentional, and things just developed this way. |
The distinction was indeed not really intentional, I guess no ReScript developer ever hit this path.
Exactly! This is also my mental model. |
Proposal, I'll add a few more examples and merge this PR. Will go into 10.1 as it needs to fix async. Then create an issue about the proper solution discussed here, to go into v11, so there's enough time to figure out if it affects anything. |
See #679