Skip to content

Tasty API support for generating local symbols #8114

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

Closed
fhackett opened this issue Jan 28, 2020 · 3 comments
Closed

Tasty API support for generating local symbols #8114

fhackett opened this issue Jan 28, 2020 · 3 comments

Comments

@fhackett
Copy link
Contributor

This issue is a generalisation of recent PR #8090, aiming to cover gaps in symbol generation that are not immediately relevant to that change. That change enables the generation of method symbols, including method parameters as consequence.

Remaining symbols the Tasty API should be able to generate are:

  • symbols for local vals (including vars, etc)
  • symbols for pattern binds
  • symbols for local classes / objects / etc

Several of these kinds of symbols can be hacked into existence by stealing them from quotes, but this means we can't directly control things like names, flags (and location information?). Especially since we now have Symbol.newMethod, it would be strange not to at least support vals and pattern binds. Local classes may be more complicated, so I will be experimenting with those last.

I'll be writing up any ideas / progress here for comment.

@nicolasstucki
Copy link
Contributor

Adding Symbol.newVal in #8291

@bishabosha
Copy link
Member

How many other parts are missing?

@fhackett
Copy link
Contributor Author

fhackett commented Apr 5, 2020

@bishabosha since #8291 covers local vals and #8090 covers local methods, the other main item is pattern binds.

That is the introduction of the name x in the following code, and other things like it:

??? match {
  case x => ???
}

After that we've covered most of the local definitions that make sense.

The remaining more "out there" items are local classes/objects, which would then need all the different kinds of class-level symbol for the fields. At that point you'd be able to synthesize essentially any kind of sub-program you like from a Tasty macro.

anatoliykmetyuk added a commit that referenced this issue May 13, 2020
Fix #8114: Add bind symbol and tree constructors
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