-
Notifications
You must be signed in to change notification settings - Fork 23
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
parser change to "let" desugaring not quite right yet #83
Comments
In fact, I think not only should |
FWIW, it looks like the 4.14 change was introduced here: The discussion seems mostly about type annotations in record expressions (the helper function |
OK, staring a little at the discussion, I think I understand their motivation. The key example seems to be |
Why is that different from anything else? The pattern is a punned record, too. |
Sorry - I don't understand your question. To be clear, I think the change you want sounds reasonable. My comments above were just trying to work out what the change to the parser in 4.14 was, considering it seems like obviously the wrong choice for which part of an annotated let binding should be marked "ghost", as you observe. |
Ah, got it. I had misunderstood what you were saying, then. |
This issue has been open one year with no activity. Consequently, it is being marked with the "stale" label. What this means is that the issue will be automatically closed in 30 days unless more comments are added or the "stale" label is removed. Comments that provide new information on the issue are especially welcome: is it still reproducible? did it appear in other contexts? how critical is it? etc. |
I'm closing this as |
The form
let x : t = e
desugars tolet (x : t) = (e : t)
. Prior to 4.14, both type constraints (on the pattern and on the expression) hadloc_ghost=true
. In 4.14, now(x : t)
hasloc_ghost=true
and(e : t)
hasloc_ghost=false
.I think this is a step forward, in that yes, one occurrence of the type constraint should be annotated as "real" syntax, for purposes of merlin and so forth. But it seems like
(x : t)
should haveloc_ghost=false
instead, and(e : t)
should haveloc_ghost=true
. The type constraint originally appears next to the pattern, so that seems clearly the "real" occurrence, and the locations will line up better that way.cc @lpw25
The text was updated successfully, but these errors were encountered: