Compiler
Attributes
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
Compiler.type
Members list
Type members
Classlikes
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Types
Value members
Concrete methods
Compiles the given expression to a scalus.compiler.sir.SIR at compile time using the Scalus compiler plugin.
Compiles the given expression to a scalus.compiler.sir.SIR at compile time using the Scalus compiler plugin.
Value parameters
- e
-
The expression to compile.
Attributes
- Returns
-
The compiled scalus.compiler.sir.SIR.
- Example
-
val sir = Compiler.compile(true) // Compiles the expression `true` to a SIR val uplc = sir.toUplc() // Converts the SIR to UPLC
Compiles the given expression to a scalus.compiler.sir.SIR at compile time using the Scalus compiler plugin, producing debug output during the compilation.
Compiles the given expression to a scalus.compiler.sir.SIR at compile time using the Scalus compiler plugin, producing debug output during the compilation.
Value parameters
- e
-
The expression to compile.
Attributes
- Returns
-
The compiled scalus.compiler.sir.SIR.
Compiles the given expression to a scalus.compiler.sir.SIR at compile time using the Scalus compiler plugin, with explicit compiler options and debug output.
Compiles the given expression to a scalus.compiler.sir.SIR at compile time using the Scalus compiler plugin, with explicit compiler options and debug output.
Value parameters
- e
-
The expression to compile.
- options
-
The compiler options to use.
Attributes
- Returns
-
The compiled scalus.compiler.sir.SIR.
Generates a Compiler.compile(code) call at compile time.
Generates a Compiler.compile(code) call at compile time.
When you want to use Compiler.compile in an inline method you can't do it directly, because the Scalus compiler plugin finds the call to Compiler.compile and replaces it with the compiled code. Which is not what you want in this case!
For example this will not work:
inline def myTest(inline code: Any): SIR = {
Compiler.compile(code).toUplc().evaluate
}
Instead, you should use this method:
inline def myTest(inline code: Any): SIR = {
Compiler.compileInline(code).toUplc().evaluate
}
Attributes
Compiles the given expression to a scalus.compiler.sir.SIRType at compile time using the Scalus compiler plugin.
Compiles the given expression to a scalus.compiler.sir.SIRType at compile time using the Scalus compiler plugin.
Type parameters
- T
-
The type to compile.
Attributes
- Returns
-
The compiled scalus.compiler.sir.SIRType.
- Example
-
// Compiles the type `BigInt` to a SIRType.Integer val sirType = Compiler.compileType[BigInt]
Compiles the given expression to a scalus.compiler.sir.SIR at compile time using the Scalus compiler plugin, with explicit compiler options.
Compiles the given expression to a scalus.compiler.sir.SIR at compile time using the Scalus compiler plugin, with explicit compiler options.
Value parameters
- e
-
The expression to compile.
- options
-
The compiler options to use.
Attributes
- Returns
-
The compiled scalus.compiler.sir.SIR.