← ZIO Direct docs

Embedder

zio.direct.core.metaprog.Embedder
object Embedder

Attributes

Source
Embedder.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Embedder.type

Members list

Type members

Classlikes

object Compose

Attributes

Source
Embedder.scala
Supertypes
class Object
trait Matchable
class Any
Self type
Compose.type

Value members

Concrete methods

def computeCommonBaseClass(using Quotes)(a: x$1.reflect.TypeRepr, b: x$1.reflect.TypeRepr): x$1.reflect.TypeRepr

Attributes

Source
Embedder.scala
def replaceSymbolIn(using Quotes)(in: x$1.reflect.Term)(oldSymbol: x$1.reflect.Symbol, newSymbolTerm: x$1.reflect.Term): x$1.reflect.Block

In a case where we have: val a = unlift(foobar) otherStuff

In a case where we have: val a = unlift(foobar) otherStuff

We can either lift that into: unlift(foobar).flatMap { v => (otherStuff /with replaced a -> v/) }

Or we can just do unlift(foobar).flatMap { v => { val a = v; otherStuff /* with the original a variable*/ } }

I think the 2nd variant more performant but keeping 1st one (Trees.replaceIdent(...)) around for now.

Attributes

Source
Embedder.scala
def replaceSymbolInBodyMaybe(using Quotes)(body: x$1.reflect.Term)(oldSymbolTerm: Option[x$1.reflect.Symbol], newSymbolTerm: x$1.reflect.Term): x$1.reflect.Term

Attributes

Source
Embedder.scala
def topLevelOwner(using Quotes): x$1.reflect.Symbol

Attributes

Source
Embedder.scala
def useNewSymbolIn(using Quotes)(tpe: x$1.reflect.TypeRepr)(useSymbol: x$1.reflect.Term => x$1.reflect.Term): (x$1.reflect.Symbol, x$1.reflect.Term)

Attributes

Source
Embedder.scala