LambdasImpl

libretto.lambda.LambdasImpl
opaque class LambdasImpl[-⚬[_, _], |*|[_, _], V](using ssc: SymmetricSemigroupalCategory[-⚬, |*|], inj: BiInjective[|*|]) extends Lambdas[-⚬, |*|, V]

Attributes

Graph
Supertypes
trait Lambdas[-⚬, |*|, V]
class Object
trait Matchable
class Any

Members list

Concise view

Type members

Classlikes

object AbstractFun extends AbstractFuns

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Attributes

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

Attributes

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

Attributes

Companion:
trait
Graph
Supertypes
trait Sum
trait Mirror
trait Exprs
class Object
trait Matchable
class Any
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
Graph
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]
object Unvar

Attributes

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

Attributes

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

Inherited classlikes

Attributes

Inherited from:
Lambdas
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object AbstractFun.type
trait Contexts

Attributes

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

Attributes

Inherited from:
Lambdas
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Expr.type
enum LinCheck[A]

Attributes

Inherited from:
Lambdas
Graph
Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
object LinCheck

Attributes

Inherited from:
Lambdas
Graph
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any

Attributes

Inherited from:
Lambdas
Graph
Supertypes
class Object
trait Matchable
class Any

Types

override type AbstractFun[A, B] = Shuffled[A, B]
type CapturingFun[A, B] = CapturingFun[AbstractFun, |*|, [_] =>> Tupled[Expr, _$49], A, B]
override opaque type Context
type Forest[A] = Tupled[Expr, A]

Multiple expression trees.

Multiple expression trees.

Attributes

type Var[A] = Var[V, A]

Inherited types

type AbsRes[A, B] = Abstracted[Expr, |*|, -⚬, V, A, B]

Attributes

Inherited from:
Lambdas
type Abstracted[A, B] = Abstracted[Expr, |*|, AbstractFun, V, A, B]

Attributes

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

Attributes

Inherited from:
Lambdas
type VFun[A, B] = (V, Context ?=> Expr[A] => Expr[B])

Attributes

Inherited from:
Lambdas

Value members

Concrete methods

override def eliminateLocalVariables[A, B](boundVar: Var[A], expr: Expr[B])(using Context): Abstracted[A, B]

Attributes

Definition Classes
def eliminateLocalVariablesFromForest[A, B](boundVar: Var[A], exprs: Forest[B])(using Context): Abstracted[A, B]
override def switch[<+>[_, _], A, B](cases: Sink[VFun, <+>, A, B], sum: [X, Y] => (x$1: X -⚬ B, x$2: Y -⚬ B) => <+>[X, Y] -⚬ B, distribute: [X, Y, Z] => (x$1: Unit) => X |*| <+>[Y, Z] -⚬ <+>[X |*| Y, X |*| Z])(using Context): AbsRes[A, B]

Attributes

Definition Classes

Inherited methods

def absNested[A, B](varName: V, f: Context ?=> Expr[A] => Expr[B])(using parent: Context): Abstracted[A, B]

Attributes

Inherited from:
Lambdas
def absTopLevel[A, B](varName: V, f: Context ?=> Expr[A] => Expr[B]): Abstracted[A, B]

Attributes

Inherited from:
Lambdas

Givens

Givens

given shuffle: Shuffle[|*|]
given shuffled: With[-⚬, |*|, Shuffle[|*|]]

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])
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
def zip[B](b: Expr[B])(resultVar: V)(using Context): Expr[A |*| B]

Attributes

Inherited from:
Lambdas
extension [A, B](f: AbstractFun[A, B])
def fold: A -⚬ B

Attributes

Inherited from:
Lambdas