Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
UntypedPlutusCore.Evaluation.Machine.Cek.EmitterMode
Contents
Synopsis
- noEmitter ∷ EmitterMode uni fun
- logEmitter ∷ EmitterMode uni fun
- logWithTimeEmitter ∷ EmitterMode uni fun
- logWithBudgetEmitter ∷ EmitterMode uni fun
- logWithCallTraceEmitter ∷ EmitterMode uni fun
Documentation
noEmitter ∷ EmitterMode uni fun Source #
No emitter.
logEmitter ∷ EmitterMode uni fun Source #
Emits log only.
logWithTimeEmitter ∷ EmitterMode uni fun Source #
Emits log with timestamp.
logWithBudgetEmitter ∷ EmitterMode uni fun Source #
Emits log with the budget.
logWithCallTraceEmitter ∷ EmitterMode uni fun Source #
Emits log and, when script evaluation fails, call trace.
This requires script to be compiled with `PlutusTx.Plugin:profile-all` turned on because this relies
on compiler-generated trace calls that notifies entrance and exit of a function call. These traces
that mark entrance and exit are ordinary traces like "-> rob:Example.hs:3:1-3:15" and "<-
bob:Example.hs:1:1-1:13" with "->" and "<-" prefixies, where "bob" and "rob" is the name
of the function with source span. If regular script with no entrance/exit marker is given, this
emitter will behave identically to logEmitter
.
When script evaluation fails, this emitter will give call trace of the functions that led to the
evaluation failure. This is useful for pin-pointing specific area of the codebase that caused
failure when debugging a script. When script evaluation passes, every trace message generated by
`profile-all` flag will be removed, and this emitter will behave identically to logEmitter
.