Skip to content

Allow transparent parameters at any staging level #4846

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
nicolasstucki opened this issue Jul 25, 2018 · 0 comments
Closed

Allow transparent parameters at any staging level #4846

nicolasstucki opened this issue Jul 25, 2018 · 0 comments

Comments

@nicolasstucki
Copy link
Contributor

nicolasstucki commented Jul 25, 2018

Inline parameters are currently only allowed at level 0 and 1. But they should be available at any level.

transparent def foo(transparent x: Int): Int = ~fooImpl(x, '(x), '( '(x) ), '( '( '(x) ) ))
def fooImpl(a: Int, b: Expr[Int], c: Expr[Expr[Int]], d: Expr[Expr[Expr[Int]]]): Expr[Int] = ???

This makes inline values behave the same way as transparent members do.

In general, the PCP rule should be updated to say that inline values are not free variables of the quote.

@nicolasstucki nicolasstucki changed the title Allow inline parameters at any staging level Allow transparent parameters at any staging level Jul 27, 2018
nicolasstucki added a commit to dotty-staging/dotty that referenced this issue Jul 27, 2018
Stop checking and using capture tranformation for transparent parameters
nicolasstucki added a commit to dotty-staging/dotty that referenced this issue Jul 27, 2018
Stop checking and using capture tranformation for transparent parameters
@nicolasstucki nicolasstucki self-assigned this Jul 27, 2018
nicolasstucki added a commit to dotty-staging/dotty that referenced this issue Jul 30, 2018
Stop checking and using capture tranformation for transparent parameters
nicolasstucki added a commit to dotty-staging/dotty that referenced this issue Jul 30, 2018
Stop checking and using capture tranformation for transparent parameters
nicolasstucki added a commit that referenced this issue Jul 31, 2018
Fix #4846: Allow transparent parameters at any stage
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

1 participant