ExternalVar
scalus.compiler.sir.SIR.ExternalVar
case class ExternalVar(moduleName: String, name: String, tp: SIRType, anns: AnnotationsDecl) extends AnnotatedSIR
Attributes
- Graph
-
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait AnnotatedSIRtrait SIRclass Objecttrait Matchableclass AnyShow all
Members list
Value members
Concrete methods
Returns a string representation of the object.
Returns a string representation of the object.
The default representation is platform dependent.
Attributes
- Returns
-
a string representation of the object.
- Definition Classes
-
Any
Inherited methods
Applies this SIR term to an argument, creating an Apply node.
Applies this SIR term to an argument, creating an Apply node.
This method handles function application by:
- Stripping any Decl wrappers from the function term
- Extracting the result type from the function's type signature
- Creating an Apply node with the unwrapped function and argument
- Re-wrapping the result with the original Decl nodes
The method supports both simple function types (SIRType.Fun) and polymorphic functions wrapped in type lambdas (SIRType.TypeLambda).
Value parameters
- arg
-
the argument to apply to this function term
Attributes
- Returns
-
a SIR expression representing the function application, potentially wrapped in Decl nodes
- Throws
-
RuntimeException
if the term's type is not a function type
- Example
-
val f: SIR = ... // a function of type A -> B val arg: AnnotatedSIR = ... // an argument of type A val result: SIR = f $ arg // Apply(f, arg, B, anns) - Inherited from:
- SIR
Attributes
- Inherited from:
- Product
Attributes
- Inherited from:
- Product
In this article