-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Add List[Expr[T]]
to Expr[List[T]]
conversion in the library
#5543
Add List[Expr[T]]
to Expr[List[T]]
conversion in the library
#5543
Conversation
def toExpr(implicit ev: Liftable[T]): Expr[T] = ev.toExpr(x) | ||
} | ||
|
||
implicit class ListOfExprOps[T](val list: List[Expr[T]]) extends AnyVal { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't you have this conversion for free if you make Liftable[List[T]]
implicitly available?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, Liftable[List[T]]
transforms List[T]
into Expr[List[T]]
. But here we transform List[Expr[T]]
into Expr[List[T]]
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a generalisation of your liftListOfAny
.
This PR may silently conflict with #5520 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM for this PR
Question for later: what about Seq
?
|
Both
scalatest
and the interpolators need this operation and they are probably not the only ones.