LambdasImpl

libretto.lambda.LambdasImpl
opaque class LambdasImpl[->[_, _], **[_, _], V, C, SHUFFLED <: Shuffled[->, **]](val shuffled: SHUFFLED, universalSplit: Option[[X] => Unit => X -> (X ** X)], universalDiscard: Option[[X, Y] => Unit => (X ** Y) -> Y])(using inj: BiInjective[**]) extends Lambdas[->, **, V, C]

Attributes

Graph
Supertypes
trait Lambdas[->, **, V, C]
class Object
trait Matchable
class Any

Members list

Type members

Classlikes

object CapturingFun

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
object Context extends Contexts

Attributes

Supertypes
trait Contexts
class Object
trait Matchable
class Any
Self type
Context.type
object Expr extends Exprs

Attributes

Companion
trait
Supertypes
trait Sum
trait Mirror
trait Exprs
class Object
trait Matchable
class Any
Show all
Self type
Expr.type
sealed trait Expr[B]

AST of an expression, created by user code, before translation to point-free representation, containing intermediate Vars. Non-linear: includes projections and multiple occurrences of the same variable.

AST of an expression, created by user code, before translation to point-free representation, containing intermediate Vars. Non-linear: includes projections and multiple occurrences of the same variable.

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Id[A]
class Map[B, C]
class Prj1[B1, B2]
class Prj2[B1, B2]
class Zip[B1, B2]
class ZipN[A]
Show all
object Unvar

Attributes

Companion
trait
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
Unvar.type
sealed trait Unvar[A, B]

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Par[A1, A2, X1, X2]
class SingleVar[V]

Inherited classlikes

trait Contexts

Attributes

Inherited from:
Lambdas
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Context
trait Exprs

Attributes

Inherited from:
Lambdas
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Expr
object given_ClampEq_Expr extends ClampEq[Expr]

Attributes

Inherited from:
Lambdas
Supertypes
trait ClampEq[Expr]
class Object
trait Matchable
class Any

Types

type CapturingFun[A, B] = CapturingFun[shuffled.Shuffled, **, [_] =>> Tupled[Expr, _$62], A, B]
override opaque type Context
type Var[A] = Var[V, A]

Inherited types

type Delambdified[A, B] = CapturingFun[this.shuffled.Shuffled, **, [_] =>> Tupled[Expr, _$10], A, B]

Attributes

Inherited from:
Lambdas
type Delambdifold[A, B] = CapturingFun[->, **, [_] =>> Tupled[Expr, _$11], A, B]

Attributes

Inherited from:
Lambdas

Attributes

Inherited from:
Lambdas
final type Tupled[F[_], A] = Tupled[**, F, A]

Attributes

Inherited from:
Lambdas

Value members

Concrete methods

override def eliminateLocalVariables[A, B](boundVar: Var[A], expr: Expr[B])(using ctx: Context): Validated[LinearityViolation, Delambdified[A, B]]

Attributes

Definition Classes

Inherited methods

def delambdifyFoldNested[A, B](nestedCtxInfo: C, varName: V, f: Context ?=> Expr[A] => Expr[B])(using parent: Context, cat: SymmetricSemigroupalCategory[->, **]): Validated[LinearityViolation, Delambdifold[A, B]]

Attributes

Inherited from:
Lambdas
def delambdifyFoldTopLevel[A, B](freshCtxInfo: C, varName: V, f: Context ?=> Expr[A] => Expr[B])(using SymmetricSemigroupalCategory[->, **]): Validated[LinearityViolation, Delambdifold[A, B]]

Attributes

Inherited from:
Lambdas
def delambdifyNested[A, B](nestedCtxInfo: C, varName: V, f: Context ?=> Expr[A] => Expr[B])(using parent: Context): Validated[LinearityViolation, Delambdified[A, B]]

Attributes

Inherited from:
Lambdas
def delambdifyTopLevel[A, B](freshCtxInfo: C, varName: V, f: Context ?=> Expr[A] => Expr[B]): Validated[LinearityViolation, Delambdified[A, B]]

Attributes

Inherited from:
Lambdas

Concrete fields

override val shuffled: SHUFFLED

Givens

Inherited givens

Attributes

Inherited from:
Lambdas

Extensions

Extensions

extension [F[_], V, U](ev: F[Var[V]] =:= (Var[U] ** Var[U]))
def deriveEquality(f: Focus[**, F]): V =:= U
extension [F[_]](f: Focus[**, F])
def mustBeId[A, V](using ev: F[A] =:= Var[V]): A =:= Var[V]

Inherited extensions

extension [A](a: Expr[A])
infix def map[B](f: A -> B)(resultVar: V)(using Context): Expr[B]

Attributes

Inherited from:
Lambdas
def resultVar: Var[V, A]

Attributes

Inherited from:
Lambdas
infix def zip[B](b: Expr[B])(resultVar: V)(using Context): Expr[A ** B]

Attributes

Inherited from:
Lambdas