package wax-lib
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=4361e1324b7754a4c08ab5b505df32061f3ce0cea60443fd0d3699e0fa796b32
sha512=fcc756d2f160ba90a9aa1131f2ab22ed7f45466ccd658c21cf9df6868a6aab0cee7f404719d698a379958802f9820398f2fe0685ecc4dda018ca4f653294e39b
doc/wax-lib.wax/Wax_lang/index.html
Module Wax_langSource
Specialization of Wax conditional annotations (#[if(...)] / #[else]) against user-supplied variable bindings, the Wax-AST counterpart of Wax_wasm.Cond_specialize.module_.
The inferred-type lattice used while type checking, the mutable cells (Cell) that carry it, and the shared printers/type aliases built on top.
Member-completion candidates and value-method tables for recv.<here> and ns::<here>: the fields, value methods and namespace free functions the editor offers there, with their rendered types and signatures. Shared between the type checker (which records a member_receiver at each access and dispatches through the same registries) and Wax_editor.
Sync-token classification for the Wax parser's panic-mode error recovery.
The naming/context layer shared by the type checker and its extracted passes (Typing_lint, Typing_suggest): the typed-tree annotation types, the resolved-reference and member-completion sinks, the name tables (Namespace / Tbl), the type and module contexts, the error-free accessor variants the lint/suggest code reads through, and the source-slice utilities the quick fixes build edits from. Its concrete types are re-exported by Typing through type equations, so external consumers keep seeing them as Wax_lang.Typing.reference etc.
Pure AST analysis helpers and the source-walking lint checks. The analysis primitives (value-effect classification, hole counting, the per-function collection passes) are shared with the type checker; the lint checks (constant conditions, shift/division/conversion traps, tautologies, redundant arithmetic, eager ?:, operator precedence) run once over the source AST and emit warnings. The warning-emitting Error submodule is internal.
The machine-applicable quick-fix suggestions the typer offers for hand-written Wax (redundant type annotations, compound assignment, field punning). Each is a Suggestion diagnostic carrying a source-slice-built Wax_utils.Diagnostic.edit; the type checker calls these when ctx.suggest is set. The block/if result-type suggestions and their driver context_block_typ stay in Typing, which calls suggest_block_result / suggest_if_result here. The Suggestion-emitting Error submodule is internal.