IntrinsicsUplcConstrOption

scalus.compiler.intrinsics.IntrinsicsUplcConstrOption

Native-Constr Option intrinsics — thin delegation to UplcConstrOptionOperations.

The IntrinsicResolver dispatches to these when Option.method(...) is called on an Option whose lowered representation is SumUplcConstr. Type parameters are annotated @UplcRepr(TypeVar(Transparent)): the caller's concrete representation substitutes at the inline site. Every Option[_] container in the signatures is annotated @UplcRepr(UplcConstr) — under the per-signature annotation regime (no uplcGeneratorPolicy swap), this is how the dispatcher's inline self match { ... } lands on the UplcConstr code path and how its result stays in UplcConstr form.

Simple operations (isDefined, isEmpty, get) are implemented inline since they're single pattern matches. Higher-order operations (map, flatMap, filter, exists, forall) delegate to UplcConstrOptionOperations.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def contains[A](self: Option[A], elem: A): Boolean
def exists[A](self: Option[A], predicate: A => Boolean): Boolean
def filter[A](self: Option[A], predicate: A => Boolean): Option[A]
def flatMap[A, B](self: Option[A], mapper: A => Option[B]): Option[B]
def forall[A](self: Option[A], predicate: A => Boolean): Boolean
def get[A](self: Option[A]): A
def getOrElse[A](self: Option[A], default: A): A
def isDefined[A](self: Option[A]): Boolean
def isEmpty[A](self: Option[A]): Boolean
def map[A, B](self: Option[A], mapper: A => B): Option[B]

Concrete fields

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