Contexts

libretto.lambda.Lambdas.Contexts
trait Contexts

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Context

Members list

Value members

Abstract methods

def fresh(info: C): Context
def getConstant[A](v: Var[V, A])(using Context): Option[([x] => DummyImplicit ?=> x -> (A ** x), [x] => DummyImplicit ?=> x -> (x ** A))]
def getDiscard[A](v: Var[V, A])(using Context): Option[([B] => DummyImplicit ?=> (A ** B) -> B, [B] => DummyImplicit ?=> (B ** A) -> B)]
def getSplit[A](v: Var[V, A])(using Context): Option[A -> (A ** A)]
def info(using ctx: Context): C
def isDefiningFor[A](v: Var[V, A])(using ctx: Context): Boolean
def nested(info: C, parent: Context): Context
def newVar[A](label: V)(using Context): Var[V, A]
def registerConstant[A](v: Var[V, A])(introFst: [x] => DummyImplicit ?=> x -> (A ** x), introSnd: [x] => DummyImplicit ?=> x -> (x ** A))(using ctx: Context): Unit
def registerNonLinearOps[A](a: Expr[A])(split: Option[A -> (A ** A)], discard: Option[([B] => DummyImplicit ?=> (A ** B) -> B, [B] => DummyImplicit ?=> (B ** A) -> B)])(using Context): Unit

Concrete methods

def exprDiscarderSh(using Context): [X] => Expr[X] => Option[([Y] => DummyImplicit ?=> shuffled.Shuffled[X ** Y, Y], [Y] => DummyImplicit ?=> shuffled.Shuffled[Y ** X, Y])]
def exprDiscarders(using Context): [X] => Expr[X] => Option[([Y] => DummyImplicit ?=> (X ** Y) -> Y, [Y] => DummyImplicit ?=> (Y ** X) -> Y)]
def getDiscardSh[A](v: Var[V, A])(using Context): Option[([B] => DummyImplicit ?=> shuffled.Shuffled[A ** B, B], [B] => DummyImplicit ?=> shuffled.Shuffled[B ** A, B])]
def registerDiscard[A](a: Expr[A])(discardFst: [B] => DummyImplicit ?=> (A ** B) -> B, discardSnd: [B] => DummyImplicit ?=> (B ** A) -> B)(using Context): Unit
def registerSplit[A](a: Expr[A])(split: A -> (A ** A))(using Context): Unit