package wax-lib
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=4361e1324b7754a4c08ab5b505df32061f3ce0cea60443fd0d3699e0fa796b32
sha512=fcc756d2f160ba90a9aa1131f2ab22ed7f45466ccd658c21cf9df6868a6aab0cee7f404719d698a379958802f9820398f2fe0685ecc4dda018ca4f653294e39b
doc/wax-lib.utils/Wax_utils/Debug/index.html
Module Wax_utils.DebugSource
Developer-facing debug output, enabled per category with --debug.
type category = | Timing| Width_check(*
*)Width_checkturns on the Wasm-to-Wax differential width check (seeWax_lang.Typing.f's~width_check): a decompiled expression whose printed form Wax would re-infer at another width is reported instead of being printed. Extend with future debug features.| Width_record(*
*)Width_recordturns on the recording-gap census: on a Wasm-to-Wax conversion, report (to stderr) every numeric-valued node the conversion emitted without recording the type its opcode states —Ast.expectation'sUnset, as opposed to a deliberateContextual. Such a node is invisible to the width check above by construction, so a gap can only surface as a silent drift; this makes the class enumerable instead.
Known category names, for help text and error messages. Currently ["timing"; "width-check"; "width-record"].
Parse one category name; Error msg names the valid categories.
Record which debug categories are active. Call once at startup.
timed label f runs f (). When Timing is enabled, it measures the wall-clock duration of f and prints "<label>: <n> ms" to stderr; otherwise it just runs f with no measurement and no output.
timed_if cond label f is timed label f when cond holds, and f () untimed otherwise. Used to skip timing a measurement-only sub-pass (e.g. the dry trivia-collection traversal of the printer).