Plutus Tx Compiler Options
These options can be passed to the compiler via the OPTIONS_GHC
pragma, for instance
{-# OPTIONS_GHC -fplugin-opt PlutusTx.Plugin:dump-uplc #-}
{-# OPTIONS_GHC -fplugin-opt PlutusTx.Plugin:max-simplifier-iterations=3 #-}
For each boolean option, you can add a no-
prefix to switch it off, such as
no-typecheck
, no-simplifier-beta
.
Option |
Value Type |
Default |
Description |
---|---|---|---|
|
Bool |
False |
When conservative optimisation is used, only the optimisations that never make the program worse (in terms of cost or size) are employed. Implies |
|
Int |
1 |
Set context level for error messages. |
|
Bool |
False |
Add all available coverage annotations in the trace output |
|
Bool |
False |
Add boolean coverage annotations in the trace output |
|
Bool |
False |
Add location coverage annotations in the trace output |
|
Bool |
False |
If a compilation error happens and this option is turned on, the compilation error is suppressed and the original Haskell expression is replaced with a runtime-error expression. |
|
Bool |
False |
Dump compilation trace for debugging |
|
Bool |
False |
Dump Plutus IR |
|
Bool |
False |
Dump Typed Plutus Core |
|
Bool |
False |
Dump Untyped Plutus Core |
|
Int |
12 |
Set the max iterations for the PIR simplifier |
|
Int |
12 |
Set the max iterations for the UPLC simplifier |
|
Bool |
True |
Run optimization passes such as simplification and floating let-bindings. |
|
Bool |
False |
Run type checker after each compilation pass |
|
ProfileOpts |
None |
Set profiling options to All, which adds tracing when entering and exiting a term. |
|
Bool |
True |
Use a more aggressive float-in pass, which often leads to reduced costs but may occasionally lead to slightly increased costs. |
|
Bool |
False |
Eliminate calls to |
|
Bool |
True |
Run a simplification pass that performs beta transformations |
|
Bool |
True |
Run a simplification pass that performs inlining |
|
Bool |
True |
Run a simplification pass that removes dead bindings |
|
Bool |
True |
Run a simplification pass that cancels unwrap/wrap pairs |
|
Bool |
True |
Run a simplification pass that makes bindings stricter |
|
Version |
1.1.0 |
The target Plutus Core language version |
|
Bool |
True |
Perform type checking during compilation. |
|
Verbosity |
Quiet |
Set logging verbosity level (0=Quiet, 1=Verbose, 2=Debug) |