Skip to content
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

Avoiding "let" as a value name #5802

Closed
vicuna opened this Issue Oct 27, 2012 · 3 comments

Comments

Projects
None yet
2 participants
@vicuna
Copy link
Collaborator

commented Oct 27, 2012

Original bug ID: 5802
Reporter: turpin
Assigned to: @garrigue
Status: closed (set by @xavierleroy on 2015-12-11T18:21:08Z)
Resolution: fixed
Priority: low
Severity: trivial
Version: 4.00.1
Target version: 4.01.0+dev
Fixed in version: 4.01.0+dev
Category: typing

Bug description

In Typecore, "let" is used as a value name (to avoid changing side-effects when doing eta-expansion). For the purpose of unparsing typedtrees, "let" or "let" would be nicer.

@vicuna

This comment has been minimized.

Copy link
Collaborator Author

commented Jan 3, 2013

Comment author: @damiendoligez

But using let or let would interfere with legitimate programs that use these identifiers. AFAICT, that's the whole point of using a keyword here.

@vicuna

This comment has been minimized.

Copy link
Collaborator Author

commented Jul 24, 2013

Comment author: turpin

Maybe I'm wrong, but since the generated expression is 'let v = e in v', I believe that the variable name for v cannot interfere with anything, and can be chosen arbitrarily. Is that correct ?

@vicuna

This comment has been minimized.

Copy link
Collaborator Author

commented Jul 24, 2013

Comment author: @garrigue

Actually, the name is completely irrelevant, as it is not added to the environment (a fresh identifier is created in place).
I changed it to arg.
And due to the structure of the generated expression, there should be no shadowing introduced.
Precisely, what we get is something of the form:
let arg = in (fun eta -> arg ?lab1:None ... ?labn:None eta)

@vicuna vicuna closed this Dec 11, 2015

@vicuna vicuna added the typing label Mar 14, 2019

@vicuna vicuna added this to the 4.01.0 milestone Mar 14, 2019

@vicuna vicuna added the bug label Mar 20, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.