Skip to main content

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.

OptionValue TypeDefaultDescription
conservative-optimisationBoolFalseWhen conservative optimisation is used, only the optimisations that never make the program worse (in terms of cost or size) are employed. Implies no-relaxed-float-in.
context-levelInt1Set context level for error messages.
coverage-allBoolFalseAdd all available coverage annotations in the trace output
coverage-booleanBoolFalseAdd boolean coverage annotations in the trace output
coverage-locationBoolFalseAdd location coverage annotations in the trace output
defer-errorsBoolFalseIf 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.
dump-compilation-traceBoolFalseDump compilation trace for debugging
dump-pirBoolFalseDump Plutus IR
dump-plcBoolFalseDump Typed Plutus Core
dump-uplcBoolFalseDump Untyped Plutus Core
max-cse-iterationsInt4Set the max iterations for CSE
max-simplifier-iterations-pirInt12Set the max iterations for the PIR simplifier
max-simplifier-iterations-uplcInt12Set the max iterations for the UPLC simplifier
optimizeBoolTrueRun optimization passes such as simplification and floating let-bindings.
pedanticBoolFalseRun type checker after each compilation pass
profile-allProfileOptsNoneSet profiling options to All, which adds tracing when entering and exiting a term.
relaxed-float-inBoolTrueUse a more aggressive float-in pass, which often leads to reduced costs but may occasionally lead to slightly increased costs.
remove-traceBoolFalseEliminate calls to trace from Plutus Core
simplifier-betaBoolTrueRun a simplification pass that performs beta transformations
simplifier-inlineBoolTrueRun a simplification pass that performs inlining
simplifier-remove-dead-bindingsBoolTrueRun a simplification pass that removes dead bindings
simplifier-unwrap-cancelBoolTrueRun a simplification pass that cancels unwrap/wrap pairs
strictify-bindingsBoolTrueRun a simplification pass that makes bindings stricter
target-versionVersion1.1.0The target Plutus Core language version
typecheckBoolTruePerform type checking during compilation.
verbosityVerbosityQuietSet logging verbosity level (0=Quiet, 1=Verbose, 2=Debug)