Dotty Documentation

0.18.0-bin-SNAPSHOT

object ExprOps
extends Object with Serializable

[-] Constructors

[-] Members

[+] def toExpr ( x: T ) ( implicit evidence$7: Liftable [ T ] , x$1: QuoteContext ) : Expr [ T ]
[+] def toExprOfList ( list: List [ Expr [ T ] ] ) ( implicit x$1: Type [ T ] , x$2: QuoteContext ) : Expr [ List [ T ] ]

Lifts this list of expressions into an expression of a list

Transforms a list of expression List(e1, e2, ...) where ei: Expr[T] to an expression equivalent to '{ List($e1, $e2, ...) } typed as an Expr[List[T]]

[+] def toExprOfSeq ( seq: Seq [ Expr [ T ] ] ) ( implicit tp: Type [ T ] , qctx: QuoteContext ) : Expr [ Seq [ T ] ]

Lifts this sequence of expressions into an expression of a sequence

Transforms a list of expression Seq(e1, e2, ...) where ei: Expr[T] to an expression equivalent to '{ Seq($e1, $e2, ...) } typed as an Expr[Seq[T]]

Usage:

'{ List(${List(1, 2, 3).toExprOfSeq}: _*) } // equvalent to '{ List(1, 2, 3) }