ProductCaseSirTypeGenerator

scalus.sir.lowering.typegens.ProductCaseSirTypeGenerator

Product with one element without parent, represented as an element.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Type members

Classlikes

Attributes

Supertypes
trait LoweredValue
class Object
trait Matchable
class Any

Value members

Concrete methods

Get default representation for data representation of this type. This representation is used when converting to data.

Get default representation for data representation of this type. This representation is used when converting to data.

Attributes

Definition Classes
override def defaultRepresentation(tp: SIRType)(using loweringContext: LoweringContext): LoweredValueRepresentation

Get default representation. Assumed that input parameters of functions and vars and are in this representation.

Get default representation. Assumed that input parameters of functions and vars and are in this representation.

Attributes

Definition Classes

Get default representation for type variable. This representation is used when converting to parameters of scala functions with type parameters. (Usually the same as defaultDataRepresentation, except Lambdas).

Get default representation for type variable. This representation is used when converting to parameters of scala functions with type parameters. (Usually the same as defaultDataRepresentation, except Lambdas).

Attributes

Definition Classes
override def genConstr(constr: Constr)(using lctx: LoweringContext): LoweredValue

Generate constructor for this type. Always called on DataDecl.tp

Generate constructor for this type. Always called on DataDecl.tp

Value parameters

constr
  • constructor, which we should generate
targetType
  • type of the generated value, which should be a subtype of constr.tp

Attributes

Definition Classes
def genConstrDataConstr(constr: Constr, loweredArgs: Seq[LoweredValue], argTypeGens: Seq[SirTypeUplcGenerator])(using lctx: LoweringContext): LoweredValue
override def genMatch(matchData: Match, loweredScrutinee: LoweredValue, optTargetType: Option[SIRType])(using LoweringContext): LoweredValue

Attributes

Definition Classes
def genMatchDataList(matchData: Match, loweredScrutinee: LoweredValue, optTargetType: Option[SIRType])(using lctx: LoweringContext): LoweredValue
def genMatchPairData(matchData: Match, loweredScrutinee: LoweredValue, optTargetType: Option[SIRType])(using lctx: LoweringContext): LoweredValue
override def genSelect(sel: Select, loweredScrutinee: LoweredValue)(using lctx: LoweringContext): LoweredValue

Attributes

Definition Classes
def genSelectDataList(sel: Select, loweredScrutinee: LoweredValue)(using lctx: LoweringContext): LoweredValue
override def isDataSupported(tp: SIRType)(using loweringContext: LoweringContext): Boolean

Attributes

Definition Classes
def selectMatchCase(matchData: Match, loweredScroutine: LoweredValue, constrDecl: ConstrDecl)(using lctx: LoweringContext): Case
override def toRepresentation(input: LoweredValue, representation: LoweredValueRepresentation, pos: SIRPosition)(using lctx: LoweringContext): LoweredValue

Attributes

Definition Classes
override def upcastOne(input: LoweredValue, targetType: SIRType, pos: SIRPosition)(using lctx: LoweringContext): LoweredValue

Attributes

Definition Classes