Conversation
| // ^ren yy | ||
|
|
||
| let foo2 = (~xx) => xx + 1 | ||
| // ^ren yy |
There was a problem hiding this comment.
So foo was working and foo2 wasn't?
Not sure I get what's going on.
There was a problem hiding this comment.
They both work, but when for foo the tilde is dropped from ~xx so it becomes (yy) => ..., and for foo2 the tilde was added to the body (~yy) => ~yy + 1.
There was a problem hiding this comment.
Perhaps hacking renaming itself to special-case tilde does not break other things.
There was a problem hiding this comment.
That was my first idea but it might be a little bit of extra work, because we'll need to read the text from the loc and have a look at that. There's no information carried on that can help us when producing the rename instructions. Might be the best idea anyway though.
There was a problem hiding this comment.
That was my first idea but it might be a little bit of extra work, because we'll need to read the text from the loc and have a look at that. There's no information carried on that can help us when producing the rename instructions. Might be the best idea anyway though.
Not sure it makes sense, but perhaps when the length does not match. E.g. if the loc says 3 and it's supposed to be 2. Though that's risky.
This is an attempt to fix renaming of labelled arguments breaking because it doesn't account for
~(so~is either removed from the argument definition, or added to local bindings that are renamed).This seems to have broken a few other things though that I'm a bit unsure of how to fix. Maybe this isn't the optimal approach to this problem anyway.