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

constraints and local opens as proper nodes vs extra field #7129

Closed
vicuna opened this issue Jan 26, 2016 · 5 comments
Closed

constraints and local opens as proper nodes vs extra field #7129

vicuna opened this issue Jan 26, 2016 · 5 comments

Comments

@vicuna
Copy link

vicuna commented Jan 26, 2016

Original bug ID: 7129
Reporter: @trefis
Status: acknowledged (set by @damiendoligez on 2016-02-08T11:28:43Z)
Resolution: open
Priority: low
Severity: feature
Target version: undecided
Category: typing

Bug description

Context: #441

The code submitted in #441 is a quick hack which should be removed after 4.03's release.

This issue is here to keep track of that, as well as discuss the potential long term solutions.

@vicuna
Copy link
Author

vicuna commented Jan 26, 2016

Comment author: @trefis

Jacques said:

Typically, this information is only useful when you want to know what
the source code looked like, but comes in the way for program
transformations.
In general having to recurse on the syntax tree just to discard
information doesn't seem the right way to me.

Alain said:

As for keeping extras vs replacing them with proper nodes,
it would be useful to have concrete examples of which pattern matching
would actually become more complex with proper nodes. Typedtree is
being used more and more by external tools (through .cmt files), and
having something as simple as possible (and close to the Parsetree)
also has some value. If this amounts to adding 10 lines of code to
traverse (current) extra nodes, it's worth the change, I'd say.

Personally I tend do agree with Alain on that one.
I will do an implementation with the extra constructors added to the expression type that way we can see how much code change is needed.

@vicuna
Copy link
Author

vicuna commented Mar 14, 2017

Comment author: @garrigue

No bug here.

@vicuna vicuna added the typing label Mar 14, 2019
@trefis
Copy link
Contributor

trefis commented Mar 15, 2019

FTR local opens in expressions are now actual an actual node, not stored in the extra field.
That is still not the case for patterns.

Nothing happened on the side of type constraints.

@github-actions
Copy link

github-actions bot commented May 9, 2020

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.

@github-actions github-actions bot added the Stale label May 9, 2020
@Drup
Copy link
Contributor

Drup commented May 9, 2020

This is a bit of a meta-issue on code-cleanliness. I also agree with @alainfrisch and @trefis that making parsetree and typedtree completely mirrored, without any extra nodes, would be nice. It's just a matter of someone doing it.

@trefis trefis closed this as completed May 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants