PartialEvaluator
scalus.uplc.transform.PartialEvaluator
object PartialEvaluator
Compile-time partial evaluator for UPLC terms.
Evaluates closed subexpressions (no free variables) at compile time using the CEK machine and replaces them with their result. This covers saturated builtin applications, lambda applications with constant arguments, case/constr elimination on known constructors, and any composition of the above.
==Safety==
A budget cap prevents expensive computations from slowing the compiler. Failed evaluations (runtime errors, budget exceeded) leave the original term unchanged, preserving semantics.
Attributes
- See also
-
Inliner which calls this after inlining and beta-reduction
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
PartialEvaluator.type
Members list
In this article