f fields performs type checking on the given list of Wax module fields. It verifies types, signatures, and other semantic rules.
When simplify is set (default false), the typed AST is also rewritten: casts the inferred types make redundant are dropped, and &?extern/&?any casts of non-nullable arguments are tightened to &extern/&any. This is intended for the Wasm-to-Wax conversion, where casts are inserted to pin types; hand-written Wax is left untouched.
When faithful is set (default false, the --faithful decompilation mode, mutually exclusive with simplify), casts are kept as under a plain re-type EXCEPT the From_wasm scaffolding cast on a call_ref callee, which is still dropped when redundant so it does not re-lower to a spurious ref.cast.
When warn_unused is set (default false), a let-bound local that is never read is reported as a warning (unless its name starts with _). A conditional module is checked per reachable configuration, so the warning fires there too.
When suggest is set (default false), machine-applicable simplifications are reported as Suggestion diagnostics (see check); it is mutually exclusive with simplify.
width_check (default `Off) reconciles the type the Wasm-to-Wax conversion recorded on a node (Ast.instr's expected) with the type resolved here — a disagreement means the Wax about to be printed would recompile at a different opcode width. It is about the decompiler, not the module, so it does nothing for a module that carries no recorded expectation (anything but Wax_conversion.From_wasm output).
`Repair is what the decompilation pipelines pass: a value whose type merely DEFAULTED to the wrong width is repaired in place — wrapped in the identity cast that pins it at the recorded width, the grounding pin the conversion should have placed — so a missing pin becomes correct output rather than a silent miscompile.`Report reports the same disagreement as an error instead of repairing it (the --debug width-check switch). That is what lets the fuzzing harness see a missing conversion pin at all, rather than a healed one.- A disagreement no pin can fix — the value's type is fixed by its context, so a cast would convert the value rather than ground it — is reported as an error in BOTH modes.