SumListCommonSirTypeGenerator

scalus.compiler.sir.lowering.typegens.SumListCommonSirTypeGenerator
See theSumListCommonSirTypeGenerator companion object

handle next cases: scalus.cardano.onchain.plutus.prelude.List[A] scalus.uplc.builtin.BuiltinList[A] scalus.cardano.onchain.plutus.prelude.PairList[A, B]

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes

Members list

Value members

Abstract methods

def genNil(resType: SIRType, pos: SIRPosition)(using LoweringContext): LoweredValue

mkNilData and mkNilPairData

mkNilData and mkNilPairData

Attributes

Concrete methods

def fixNilInConstr(input: LoweredValue, targetListType: SIRType, targetRepr: LoweredValueRepresentation)(using lctx: LoweringContext): LoweredValue
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
override def genMatch(matchData: Match, loweredScrutinee: LoweredValue, optTargetType: Option[SIRType])(using lctx: LoweringContext): LoweredValue

Attributes

Definition Classes
override def genSelect(sel: Select, loweredScrutinee: LoweredValue)(using lctx: LoweringContext): LoweredValue

Attributes

Definition Classes
def isBuiltinList(tp: SIRType): Boolean
override def isDataSupported(tp: SIRType)(using lctx: LoweringContext): Boolean

Attributes

Definition Classes
def isNilType(tp: SIRType): Boolean
override def toRepresentation(input: LoweredValue, outputRepresentation: 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

Inherited and Abstract methods

Get default representation for data representation of this type. This representation is used when converting to data instrucutres, which holds value as data.

Get default representation for data representation of this type. This representation is used when converting to data instrucutres, which holds value as data.

Attributes

Inherited from:
SirTypeUplcGenerator

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

Inherited from:
SirTypeUplcGenerator

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

Inherited from:
SirTypeUplcGenerator