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

coverage-all

Bool

False

Add all available coverage annotations in the trace output

coverage-boolean

Bool

False

Add boolean coverage annotations in the trace output

coverage-location

Bool

False

Add location coverage annotations in the trace output

debug

Bool

False

Set log level to debug

debug-context

Int

1

Set context level to 3, which means error messages contain full contexts.

defer-errors

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.

dump-pir

Bool

False

Dump Plutus IR

dump-plc

Bool

False

Dump Typed Plutus Core

dump-uplc

Bool

False

Dump Untyped Plutus Core

max-simplifier-iterations

Int

12

Set the max iterations for the simplifier

no-context

Int

1

Set context level to 0, which means error messages contain minimum contexts.

optimize

Bool

True

Run optimization passes such as simplification and floating let-bindings.

pedantic

Bool

False

Run type checker after each compilation pass

profile-all

ProfileOpts

None

Set profiling options to All, which adds tracing when entering and exiting a term.

remove-trace

Bool

False

Eliminate calls to trace from Plutus Core

simplifier-beta

Bool

True

Run a simplification pass that performs beta transformations

simplifier-inline

Bool

True

Run a simplification pass that performs inlining

simplifier-remove-dead-bindings

Bool

True

Run a simplification pass that removes dead bindings

simplifier-unwrap-cancel

Bool

True

Run a simplification pass that cancels unwrap/wrap pairs

typecheck

Bool

True

Perform type checking during compilation.

verbose

Bool

False

Set log level to verbose