BuiltinListSupport

scalus.compiler.intrinsics.BuiltinListSupport

Support module (lowered once) for the BuiltinList / Data representation of List.

Every element here is in Data representation, so equality is just equalsData — no per-type code and no eq function to thread through. (Contrast NativeListOperations, whose elements are in Constant/native repr: there the dispatcher must pass equalsRepr, which produces different code per concrete type and so can't be baked into a once-lowered support.)

The intrinsic dispatchers (BuiltinListOperations / ...V11) just forward here. See docs/local/claude/compiler/v3-eq-eliminating.md.

List-returning ops build the result as List[Data] (each element a Data value) and return it typeProxy'd to List[A]. This support is lowered ONCE with A abstract, so it cannot relabel the result to A's concrete element repr (the element type is an unresolved TypeVar here). The dispatcher (BuiltinListOperations, re-lowered per concrete element type) does that relabel via typeProxyRepr — see there.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def contains[A](self: List[A], elem: A): Boolean
def deleteFirst[A](self: List[A], elem: A): List[A]
def diff[A](self: List[A], other: List[A]): List[A]
def distinct[A](self: List[A]): List[A]
def indexOf[A](self: List[A], elem: A): BigInt

Concrete fields

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