UplcConstrListOperations

scalus.compiler.intrinsics.UplcConstrListOperations

UplcConstr list operations — recursive implementations with local go functions.

Every List[_] / Option[_] in the signatures carries a type-level @UplcRepr(UplcRepresentation.UplcConstr) annotation (List[A] @UplcRepr(UplcConstr)). The plugin's SIRTyper.sirTypeInEnv handles this AnnotatedType and wraps the SIR type with SIRType.Annotated(..., uplcRepr=UplcConstr). Unlike symbol-level annotations (which only wrap the DefDef's declared return), type-level annotations land in the SIR type itself, so a local def go(lst: List[A] @UplcRepr(UplcConstr)): List[A] @UplcRepr(UplcConstr) has a rhs.tp that is fully annotated on both in/out — matching what lowerLet:560 reads when computing rhsRepr.

Type parameters remain @UplcRepr(TypeVar(Unwrapped)): element bytes flow through in A's stable default representation.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Type members

Classlikes

case class Partition[A_Partition](before: List[A_Partition], after: List[A_Partition])

Local pair type for sort's one-pass partition result. Annotated @UplcRepr(UplcConstr) so construction uses native-Constr emission — avoids Data-encoding the List[A] fields for abstract element type A.

Local pair type for sort's one-pass partition result. Annotated @UplcRepr(UplcConstr) so construction uses native-Constr emission — avoids Data-encoding the List[A] fields for abstract element type A.

Attributes

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

Value members

Concrete methods

def append[A](self: List[A], other: List[A]): List[A]
def contains[A](self: List[A], elem: A, eq: (A, A) => Boolean): Boolean
def deleteFirst[A](self: List[A], elem: A, eq: (A, A) => Boolean): List[A]
def diff[A](self: List[A], other: List[A], eq: (A, A) => Boolean): List[A]
def distinct[A](self: List[A], eq: (A, A) => Boolean): List[A]
def drop[A](self: List[A], n: BigInt): List[A]
def dropRight[A](self: List[A], n: BigInt): List[A]
def filter[A](self: List[A], predicate: A => Boolean): List[A]
def filterMap[A, B](self: List[A], predicate: A => Option[B]): List[B]
def find[A](self: List[A], predicate: A => Boolean): Option[A]
def foldLeft[A, B](self: List[A], init: B, combiner: (B, A) => B): B
def foldRight[A, B](self: List[A], init: B, combiner: (A, B) => B): B
def indexOf[A](self: List[A], elem: A, eq: (A, A) => Boolean): BigInt
def init[A](self: List[A]): List[A]
def length[A](self: List[A]): BigInt
def map[A, B](self: List[A], mapper: A => B): List[B]
def prepended[A](self: List[A], elem: A): List[A]
def reverse[A](self: List[A]): List[A]
def sort[A](self: List[A], ord: (A, A) => Order): List[A]

Concrete fields

lazy val sirDeps: List[SIRModuleWithDeps]
lazy val sirModule: Module