O object

Expr

extends Object with Serializable

Supertypes

Object, Serializable

Members

type 

TupleOfExpr

 = Map[Tup,implicit QuoteContext => Expr[X]]

Converts a tuple (T1, ..., Tn) to (Expr[T1], ..., Expr[Tn])

Converts a tuple (T1, ..., Tn) to (Expr[T1], ..., Expr[Tn])

def 

apply

[T] ( x: T ) ( implicit  qctx: QuoteContext lift: Liftable[T] ) : Expr[T]

Lift a value into an expression containing the construction of that value

Lift a value into an expression containing the construction of that value

def 

betaReduce

[F, Args, R, G] ( f: Expr[F] ) ( implicit  tf: TupledFunction[F,Args => R] tg: TupledFunction[G,TupleOfExpr[Args] => Expr[R]] qctx: QuoteContext ) : G

Expr.betaReduce(f)(x1, ..., xn) is functionally the same as '{($f)($x1, ..., $xn)}, however it optimizes this call by returning the result of beta-redu...

Expr.betaReduce(f)(x1, ..., xn) is functionally the same as '{($f)($x1, ..., $xn)}, however it optimizes this call by returning the result of beta-reducing f(x1, ..., xn) if f is a known lambda expression.

Expr.betaReduce distributes applications of Expr over function arrows

Expr.betaReduce(_): Expr[(T1, ..., Tn) => R] => ((Expr[T1], ..., Expr[Tn]) => Expr[R])
def 

betaReduceGiven

[F, Args, R, G] ( f: Expr[F] ) ( implicit  tf: TupledFunction[F,implicit Args => R] tg: TupledFunction[G,TupleOfExpr[Args] => Expr[R]] qctx: QuoteContext ) : G

Expr.betaReduceGiven(f)(x1, ..., xn) is functionally the same as '{($f)(using $x1, ..., $xn)}, however it optimizes this call by returning the result o...

Expr.betaReduceGiven(f)(x1, ..., xn) is functionally the same as '{($f)(using $x1, ..., $xn)}, however it optimizes this call by returning the result of beta-reducing f(using x1, ..., xn) if f is a known lambda expression.

Expr.betaReduceGiven distributes applications of Expr over function arrows

Expr.betaReduceGiven(_): Expr[(T1, ..., Tn) ?=> R] => ((Expr[T1], ..., Expr[Tn]) => Expr[R])
def 

block

[T] ( statements: List[Expr[Nothing <: Any]] expr: Expr[T] ) ( implicit  qctx: QuoteContext ) : Expr[T]

Returns an expression containing a block with the given statements and ending with the expresion Given list of statements s1 :: s2 :: ... :: Nil and an...

Returns an expression containing a block with the given statements and ending with the expresion Given list of statements s1 :: s2 :: ... :: Nil and an expression e the resulting expression will be equivalent to '{ $s1; $s2; ...; $e }.

def 

nullExpr

: implicit QuoteContext => Expr[Null]

Returns a null expresssion equivalent to '{null}

Returns a null expresssion equivalent to '{null}

def 

ofList

[T] ( xs: Seq[Expr[T]] ) ( implicit  x$2: Type[T] x$3: 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 equivale...

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 

ofSeq

[T] ( xs: 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 sequence of expression Seq(e1, e2, ...) where ei: Expr[T] to an expressi...

Lifts this sequence of expressions into an expression of a sequence

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

def 

ofTuple

( seq: Seq[Expr[Nothing <: Any]] ) ( implicit  qctx: QuoteContext ) : Expr[Tuple]

Lifts this sequence of expressions into an expression of a tuple

Transforms a sequence of expression Seq(e1, e2, ...) where ei: Expr[_] to an expression...

Lifts this sequence of expressions into an expression of a tuple

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

def 

ofTuple

[T] ( tup: T ) ( implicit  evidence$1: IsMappedBy[T] evidence$2: Type[T] qctx: QuoteContext ) : Expr[InverseMap[T,Expr[T]]]

Given a tuple of the form (Expr[A1], ..., Expr[An]), outputs a tuple Expr[(A1, ..., An)].

Given a tuple of the form (Expr[A1], ..., Expr[An]), outputs a tuple Expr[(A1, ..., An)].

def 

summon

[T] ( implicit  tpe: Type[T] ) ( implicit  qctx: QuoteContext ) : Option[Expr[T]]

Find an implicit of type T in the current scope given by qctx. Return Some containing the expression of the implicit or None if implicit resolution fail...

Find an implicit of type T in the current scope given by qctx. Return Some containing the expression of the implicit or None if implicit resolution failed.

def 

unitExpr

: implicit QuoteContext => Expr[Unit]

Returns a unit expresssion equivalent to '{} or '{()}

Returns a unit expresssion equivalent to '{} or '{()}