scala.quoted

package scala.quoted

Type members

Classlikes

abstract class Expr[+T]
Quoted expression of type T.
Expr has extension methods that are defined in scala.quoted.Quotes.
Companion
object
Source
(source)
object Expr
Constructors for expressions
Companion
class
Source
(source)
trait ExprMap
Source
(source)
object Exprs
Source
(source)
trait FromExpr[T]
A type class for types that can convert a quoted.Expr[T] to a T.
- Converts expression containg literal values to their values:
  • '{1} -> 1, '{2} -> 2, ...
  • For all primitive types and String - Converts an expression that constructs a copy of its value.
  • This expression must be some kind of datastructure (Some, List, Either, ...)
  • Calls to new X or X.apply can be lifted into its value
  • Arguments of constructors can be recursively unlifted
Companion
object
Source
(source)
object FromExpr
Default given instances of FromExpr
Companion
class
Source
(source)
trait Quotes
Quotation context provided by a macro expansion or in the scope of scala.quoted.staging.run. Used to perform all operations on quoted Expr or Type.
It contains the low-level Typed AST API metaprogramming API. This API does not have the static type guarantiees that Expr and Type provide.
Source
(source)
trait ToExpr[T]
A type class for types that can convert a value of T into quoted.Expr[T] an expression that will create a copy of the value.
Companion
object
Source
(source)
object ToExpr
Default given instances of ToExpr
Companion
class
Source
(source)
abstract class Type[T <: AnyKind]
Type (or type constructor) T needed contextually when using T in a quoted expression '{... T ...}
Companion
object
Source
(source)
object Type
Methods to interact with the current Type[T] in scope
Companion
class
Source
(source)
object Varargs
Expression reepresentation of literal sequence of expressions.
Varargs can be used to create the an expression args that will be used as varargs '{ f($args: _*) } or it can be used to extract all the arguments of the a varargs.
Source
(source)

Value members

Methods

inline def quotes(using q: Quotes): q
Current Quotes in scope
Source
(source)