SumCaseClassRepresentation

scalus.compiler.sir.lowering.SumCaseClassRepresentation
See theSumCaseClassRepresentation companion trait

Attributes

Companion
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Type members

Classlikes

Representation for sum case classes that are represented as a Data with DataConstr and DataUnconstr operators to work with the data. the index of the constructor and x is a field.

Representation for sum case classes that are represented as a Data with DataConstr and DataUnconstr operators to work with the data. the index of the constructor and x is a field.

Attributes

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

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

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

Attributes

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

packed in data representation as a list of data elements. i.e. unListData for unpacking into DataList

packed in data representation as a list of data elements. i.e. unListData for unpacking into DataList

Attributes

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

Representation for sum case classes that are represented as a Pair of Int and DataList.

Representation for sum case classes that are represented as a Pair of Int and DataList.

Attributes

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

Parameterized representation for builtin lists (BuiltinList[Data]).

Parameterized representation for builtin lists (BuiltinList[Data]).

elementRepr describes how each element is stored at the UPLC level. Serialized via listData/unListData.

For pair lists (BuiltinList[BuiltinPair[Data,Data]]), use SumPairBuiltinList instead — those use mapData/unMapData and have fundamentally different UPLC type.

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type

SumPairBuiltinList packed as AssocMap (via mapData)

SumPairBuiltinList packed as AssocMap (via mapData)

Attributes

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

Representation for pair lists (BuiltinList[BuiltinPair[K,V]]). Serialized via mapData/unMapData when data-centric. Separate from SumBuiltinList because pair lists have a fundamentally different UPLC type and serialization path.

Representation for pair lists (BuiltinList[BuiltinPair[K,V]]). Serialized via mapData/unMapData when data-centric. Separate from SumBuiltinList because pair lists have a fundamentally different UPLC type and serialization path.

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type

Mutable proxy for self-referential sum representations. Like TypeProxy for SIRType — allows circular references in recursive types (e.g., List tail field references the parent List's SumUplcConstr). Set ref after constructing the real representation.

Mutable proxy for self-referential sum representations. Like TypeProxy for SIRType — allows circular references in recursive types (e.g., List tail field references the parent List's SumUplcConstr). Set ref after constructing the real representation.

Attributes

Supertypes
class Object
trait Matchable
class Any
case class SumUplcConstr(variants: SortedMap[Int, ProdUplcConstr]) extends SumCaseClassRepresentation

Parameterized sum constructor representation. Each variant (constructor tag) has its own ProdUplcConstr with per-field representations.

Parameterized sum constructor representation. Each variant (constructor tag) has its own ProdUplcConstr with per-field representations.

UPLC form: Constr(tag, [v1, v2, ...]) where fields are in the variant's representations. Pattern matching uses the Case builtin to dispatch on the tag.

Value parameters

variants

map from constructor tag to its ProdUplcConstr (field representations)

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object SumUplcConstr

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type

Value members

Concrete fields

Sentinel for native primitive lists — used by intrinsic type proxies. The actual element type is determined by refinement in the lowering from the concrete type context.

Sentinel for native primitive lists — used by intrinsic type proxies. The actual element type is determined by refinement in the lowering from the concrete type context.

Attributes