package wax-lib

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Wax_langSource

Sourcemodule Ast : sig ... end

Wax Abstract Syntax Tree.

Sourcemodule Ast_utils : sig ... end
Sourcemodule Cond_specialize : sig ... end

Specialization of Wax conditional annotations (#[if(...)] / #[else]) against user-supplied variable bindings, the Wax-AST counterpart of Wax_wasm.Cond_specialize.module_.

Sourcemodule Fast_parser : sig ... end
Sourcemodule Infer : sig ... end

The inferred-type lattice used while type checking, the mutable cells (Cell) that carry it, and the shared printers/type aliases built on top.

Sourcemodule Lexer : sig ... end

Lexer for Wax.

Sourcemodule Members : sig ... end

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.

Sourcemodule Output : sig ... end

Pretty-printing for Wax.

Sourcemodule Parser : sig ... end
Sourcemodule Parser_messages : sig ... end
Sourcemodule Recover : sig ... end

Sync-token classification for the Wax parser's panic-mode error recovery.

Sourcemodule Tokens : sig ... end
Sourcemodule Typing : sig ... end

Type checking and validation for Wax modules.

Sourcemodule Typing_env : sig ... end

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.

Sourcemodule Typing_lint : sig ... end

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.

Sourcemodule Typing_suggest : sig ... end

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.