Sub-trait for typegens that know how to convert their values to other representations directly — i.e., types whose conversion logic doesn't go through SumDispatch / ProdDispatch. Examples: primitives (Integer, ByteString, ...), Data, Fun, TypeVar, Unit, BLS curve elements, BuiltinValue, BuiltinArray, PackedDataMap.
Sum and Prod typegens (DataConstrEmitter, SumCaseUplcConstr*, ProductCase*, OneElementWrapper, SumListEmitter*) extend the base SirTypeUplcGeneratorwithout this sub-trait — their conversions are owned by SumDispatch.toRepresentation / ProdDispatch.toRepresentation and exposed via per-emitter emitConvert methods. Calling toRepresentation on those typegens directly is a compile-time error (no method to call), making the "concentrate Sum/Prod conversion in dispatchers" architectural rule machine-checked.
Convenience entry point — pre-lowers constr.args and delegates to genConstrLowered. Use this when the caller hasn't already lowered the arguments; callers that have pre-lowered arguments (like the main lowering driver) should call genConstrLowered directly to avoid double-lowering. Marked final so all dispatch decisions live in genConstrLowered and its overrides.
Convenience entry point — pre-lowers constr.args and delegates to genConstrLowered. Use this when the caller hasn't already lowered the arguments; callers that have pre-lowered arguments (like the main lowering driver) should call genConstrLowered directly to avoid double-lowering. Marked final so all dispatch decisions live in genConstrLowered and its overrides.
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.
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).
Generate constructor for this type — the workhorse, takes pre-lowered arguments. Implementations override this. Always called on DataDecl.tp (or a more specific case-class type for Sum→Product dispatch).
Generate constructor for this type — the workhorse, takes pre-lowered arguments. Implementations override this. Always called on DataDecl.tp (or a more specific case-class type for Sum→Product dispatch).
Value parameters
constr
constructor SIR node (carries name, decl, parentTypeArgs, anns, tp)
loweredArgs
already-lowered constructor arguments, in declaration order. Length matches constr.args.
optTargetType
optional target type (e.g., for Nil typing where the constr's declared tp is List[Nothing]).