CpsTreeScope

trait CpsTreeScope[F[_], CT, CC <: CpsMonadContext[F]]
class Object
trait Matchable
class Any
trait TreeTransformScope[F, CT, CC]

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

Source:
CpsTree.scala
sealed 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
Source:
CpsTree.scala
Companion:
class
Source:
CpsTree.scala
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.

Source:
CpsTree.scala
sealed abstract class CpsTree
Companion:
object
Source:
CpsTree.scala
object CpsTree
Companion:
class
Source:
CpsTree.scala
case object EmptyCpsTree extends CpsTree
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: Statement, 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
Source:
CpsTree.scala
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 adoptStatement(t: Statement): Statement
def adoptTerm(t: Term): Term
def adoptTermFun(op: Term => Term): Term => Term
def adoptType(t: TypeRepr): TypeRepr