DataData

scalus.compiler.sir.lowering.SumCaseClassRepresentation.DataData

Representation for the builtin Data type and its constructors (Constr, Map, List, I, B). Data values are stored as raw UPLC Data.

Attributes

Graph
Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Self type
DataData.type

Members list

Type members

Inherited types

type MirroredElemLabels = EmptyTuple

The names of the product elements

The names of the product elements

Attributes

Inherited from:
Singleton
type MirroredElemTypes = EmptyTuple

Attributes

Inherited from:
Singleton
type MirroredMonoType = Singleton.this.type

The mirrored *-type

The mirrored *-type

Attributes

Inherited from:
Singleton
type MirroredType = Singleton.this.type

Attributes

Inherited from:
Singleton

Inherited and Abstract types

type MirroredLabel <: String

The name of the type

The name of the type

Attributes

Inherited from:
Mirror

Value members

Concrete methods

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

Attributes

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

Attributes

Definition Classes
override def uplcType(semanticType: SIRType)(using LoweringContext): SIRType

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., Integer for Constant, Data for PackedData)

Definition Classes

Inherited methods

override def defaultUni(semanticType: SIRType)(using LoweringContext): DefaultUni

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.Integer for Constant, DefaultUni.Data for PackedData)

Definition Classes
Inherited from:
PackedDataDefaultUni
def doc: Doc

Attributes

Inherited from:
LoweredValueRepresentation
def fromProduct(p: Product): MirroredMonoType

Create a new instance of type T with elements taken from product p.

Create a new instance of type T with elements taken from product p.

Attributes

Inherited from:
Singleton
def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product
def show: String

Attributes

Inherited from:
LoweredValueRepresentation
final def stableKey: String

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
def stableKeyInternal(seen: Set[SumReprProxy]): String

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

Inherited from:
LoweredValueRepresentation

Inherited fields

override val isDataCentric: Boolean

Attributes

Inherited from:
SumCaseClassRepresentation
override val isPackedData: Boolean

Attributes

Inherited from:
SumCaseClassRepresentation