LambdaRepresentation

scalus.sir.lowering.LambdaRepresentation
case class LambdaRepresentation(funTp: SIRType, canonicalRepresentationPair: InOutRepresentationPair) extends LoweredValueRepresentation

Representation for lambda function. By default, lanbda-s accept default reperesentation for input and output types. But when we pass functions to type-parametrized functions, then calling party does not know about real parameter types and can't use default representation, so pass parameters as packed data.

So, we translate higher-order functions to packed data representation when pass as arguments to type-parametrized functions.

But some builtin function accept more then one representations, because they poplymorhiocj on plutus level. (i.e. have builtin type variables). For example: makeCons work with SumDataList and SumPairDataList, so we need to reevaluate representation when argument type is known.

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

override def doc: Doc

Attributes

Definition Classes
override def isCompatibleOn(tp: SIRType, repr: LoweredValueRepresentation, pos: SIRPosition)(using LoweringContext): Boolean

Attributes

Definition Classes
override def isCompatibleWithType(tp: SIRType): Boolean

Attributes

Definition Classes
override def isDataCentric: Boolean

Attributes

Definition Classes
override def isPackedData: Boolean

Attributes

Definition Classes

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product
def show: String

Attributes

Inherited from:
LoweredValueRepresentation