LambdaRepresentation
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 Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Members list
Value members
Concrete methods
The UPLC DefaultUni type for values in this representation.
The UPLC DefaultUni type for values in this representation.
Used to generate correctly-typed nil constants for builtin lists.
Value parameters
- semanticType
-
the high-level SIR type (e.g.,
Integer,List[BigInt])
Attributes
- Returns
-
the DefaultUni type (e.g.,
DefaultUni.Integerfor Constant,DefaultUni.Datafor PackedData) - Definition Classes
Attributes
- Definition Classes
Attributes
- Definition Classes
Attributes
- Definition Classes
Attributes
- Definition Classes
Attributes
- Definition Classes
Resolve the input/output representation pair for a function application.
Resolve the input/output representation pair for a function application.
Given the argument type and repr, unifies the type with the function's input type pattern to resolve builtin type variables. Then derives output repr by extracting TypeVar→repr mappings from the argument's type/repr structure.
E.g., for headList: ∀A. BuiltinList[A] → A applied to BuiltinList[Int] with SumBuiltinList(PackedData): type substitution gives A → Int, repr extraction gives A → PackedData, so output repr = PackedData.
Attributes
Recursive worker for stableKey. Default delegates to toString, which is correct for leaf case-objects and case-classes whose fields don't recursively contain a LoweredValueRepresentation. Any subclass that does contain a nested repr must override and call child.stableKeyInternal(seen) on each nested field.
Recursive worker for stableKey. Default delegates to toString, which is correct for leaf case-objects and case-classes whose fields don't recursively contain a LoweredValueRepresentation. Any subclass that does contain a nested repr must override and call child.stableKeyInternal(seen) on each nested field.
Attributes
- Definition Classes
Inherited methods
Attributes
- Inherited from:
- Product
Attributes
- Inherited from:
- Product
Attributes
- Inherited from:
- LoweredValueRepresentation
Stable structural key for use as cache-key / identifier-suffix. Two structurally-equal representations return equal stableKey strings.
Stable structural key for use as cache-key / identifier-suffix. Two structurally-equal representations return equal stableKey strings.
Distinct from toString: for SumReprProxy the default Object.toString returns ClassName@HEX (identity-based), leaking proxy-instance identity into any key that embeds the repr rendering (e.g. LoweringEq's sumEq helper cache, UPLC var-name derivation). Use stableKey there instead.
Implemented in terms of stableKeyInternal which threads a seen set through the recursion so self-referential SumReprProxy produces SumProxy(cycle) as a stable placeholder. Override stableKeyInternal in every subclass that recursively contains a LoweredValueRepresentation field so the seen set is propagated.
Attributes
- Inherited from:
- LoweredValueRepresentation
The SIR type that values actually have at the UPLC level for this representation.
The SIR type that values actually have at the UPLC level for this representation.
Value parameters
- semanticType
-
the high-level SIR type (e.g.,
Integer,List[BigInt])
Attributes
- Returns
-
the UPLC-level SIR type (e.g.,
Integerfor Constant,Datafor PackedData) - Inherited from:
- LoweredValueRepresentation