CpsTreeScope

trait CpsTreeScope[F[_], CT]
class Object
trait Matchable
class Any

Type members

Classlikes

case class AppendCpsTree(frs: CpsTree, snd: CpsTree) extends CpsTree

append cps tree, which is frs and then snd. we use this representation instead Mapped/Flatmapped in cases, where we later can apply await to append term and simplify tree instead wrapping awaited tree in extra flatMap

append cps tree, which is frs and then snd. we use this representation instead Mapped/Flatmapped in cases, where we later can apply await to append term and simplify tree instead wrapping awaited tree in extra flatMap

abstract class AsyncCpsTree extends CpsTree
case class AsyncLambdaCpsTree(originLambda: Term, params: List[ValDef], body: CpsTree, otpe: TypeRepr) extends CpsTree
case class AwaitAsyncCpsTree(nested: CpsTree, otpe: TypeRepr) extends AsyncCpsTree
case class AwaitSyncCpsTree(origin: Term, otpe: TypeRepr) extends AsyncCpsTree
case class BlockCpsTree(prevs: Queue[Statement], last: CpsTree) extends CpsTree
Companion
object
object BlockCpsTree
Companion
class
case class CallChainSubstCpsTree(origin: Term, shifted: Term, otpe: TypeRepr) extends CpsTree

when we have swhifted function, which should return F[A] but we want to have in F[A] methods with special meaning, which should be performed on F[_] before jumping into monad (exampe: Iterable.withFilter) we will catch in ApplyTree such methods and substitute to appropriative calls of shifted.

when we have swhifted function, which should return F[A] but we want to have in F[A] methods with special meaning, which should be performed on F[_] before jumping into monad (exampe: Iterable.withFilter) we will catch in ApplyTree such methods and substitute to appropriative calls of shifted.

sealed abstract class CpsTree
Companion
object
object CpsTree
Companion
class
case class FlatMappedCpsTree(prev: CpsTree, opm: Term => Term, otpe: TypeRepr) extends AsyncCpsTree
case class InlinedCpsTree(origin: Inlined, bindings: List[Definition], nested: CpsTree) extends CpsTree
case class MappedCpsTree(prev: CpsTree, op: Term => Term, otpe: TypeRepr) extends AsyncCpsTree
case class PureCpsTree(origin: Term, isChanged: Boolean) extends CpsTree
case class SelectTypeApplyCpsTree(origin: Option[Term], nested: CpsTree, targs: List[TypeTree], selects: List[SelectTypeApplyRecord], otpe: TypeRepr, changed: Boolean) extends CpsTree

represent select expression, which can be in monad or outside monad.

represent select expression, which can be in monad or outside monad.

constructor is not devoted to used directly: use SelectTypeApplyCpsTree.create instead. selects is reversed (i.e. external added to head)

Companion
object
case class SelectTypeApplyRecord(prevTpe: TypeRepr, symbol: Symbol, targs: List[TypeTree], level: Int)
case class ValCpsTree(valDef: ValDef, rightPart: CpsTree, nested: CpsTree, canBeLambda: Boolean) extends CpsTree

Extensions

Extensions

extension (otherCake: TreeTransformScope[_[_], _])
def adopt(t: Term): Term
def adoptTerm(t: Term): Term
def adoptTermFun(op: Term => Term): Term => Term
def adoptType(t: TypeRepr): TypeRepr