Skip to content

Add a Var abstraction in QuoteUtils #7035

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

Merged
merged 1 commit into from
Aug 16, 2019

Conversation

biboudis
Copy link
Contributor

Extracted a small abstraction for vars with update/get in a standalone package scala.quoted.util.

The motivation behind this is that sometimes we need to pass around variable references in a quoted program and maintain variable binding (demonstrated in the staged-streams test).

@biboudis biboudis dismissed nicolasstucki’s stale review August 15, 2019 14:45

Comments addressed

@biboudis biboudis merged commit 19da711 into scala:master Aug 16, 2019
@biboudis biboudis deleted the add-quote-utils branch August 16, 2019 07:32
/** Create a variable initialized with `init` and used in `body`.
* `body` recieves a `Var[T]` argument which exposes `get` and `update`.
*
* `var`('(7)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@biboudis, you forgot to adapt the comment. It should be Var(.... Also need to update the quote and splice syntax

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants