This page tracks current implementation and target status for Moth's accepted core language, compiler, build-system and backend design. Package APIs and project-builder-specific behaviour are tracked separately in Packages and Builders Progress.
Accepted deferred surfaces may appear here. Open design questions and outside-scope mechanisms do not. Permanent language exclusions live in Design scope.
Invalid-form diagnostic coverage may appear inside the row for the intended feature. This page is not a full language reference, roadmap, exclusion inventory or test manifest.
The compiler and memory design references may describe accepted end-state architecture that has not fully landed. This matrix determines general compiler support today. For live borrow checker implementation and Boracle work, use the production borrow checker tracker rather than maintaining a second status inventory here.
Exact numeric types are delivered. The integration suite, harness, benchmarks, first-party sources and executable documentation use exact numeric types, and the harness rejects the retired numeric_profile key. The delivered cast and external-boundary contracts use one plain cast spelling, exact source/target evidence, occurrence-local authored safety catches and precision-aware foreign float validation. The frontend and HTML-JS use exact-width numeric identities, I32/F64 defaults, type-preserving equal-width arithmetic and body-local numeric constraints through known shapes, generic signatures and direct generic constructors. Receiver conflicts report their witnesses in authored order. Handler fallback constraints participate before defaulting, while every authored group receives validation without dead groups contributing to inference. Core Math, Random and Text registrations use exact F64/I32 types, and numeric proofs carry no profile stamp. Build inputs accept every fixed integer and binary-float contract and keep command numbers as literals until the exact contract materialises them; MON exposes only exact-width values; no numeric profile selection remains. HTML-Wasm rejects every user aggregate holding a fixed-width scalar before lowering, and it cannot interpolate a runtime Bool into a template.
JS/HTML delivers most of the accepted implicit-failure and entry Error! contract: private propagation, expression-wide catches, eligible authored safety catches, success-only runtime fragment publication and moth dev entry-error reporting. Wasm rejects recoverable numeric failure explicitly; a safety catch whose handler is pruned after convergence publishes no backend requirement and does not gate Wasm. Conservative proof discharges Add, Subtract, Multiply and Negate over fixed-width integer domains with full-range containment; other domains are excluded from that discharge; the checked-arithmetic reference states which operations can fail.
The compact typed-expression foundation, type and folding reductions, bounded Wiring foundation, trusted Core constant evaluation and owner hardening are implemented. Fresh Windows Canvas/frontend proof remains pending.
Use this together with tests/cases/manifest.toml when changing language features.
docs/docs/**.docs/roadmap/roadmap.md.docs/compiler-design-overview.md.CONTRIBUTING.md.The supported Alpha target is:
| Status | Meaning |
|---|---|
| Supported | Implemented for the Alpha surface and expected to compile, type check, lower and run through the JS / HTML pipeline. |
| Partial | A useful subset is implemented, but some sub-surfaces are intentionally deferred, target-gated or still being shaped before Alpha. |
| Experimental | Present in the repo, but not part of the Alpha stability promise. |
| Deferred | Planned or design-compatible, but not part of the current implemented Alpha surface. |
| Coverage | Meaning |
|---|---|
| Broad | Multiple focused cases exist, including success and failure coverage. |
| Targeted | Dedicated coverage exists, but not across all important edges. |
| Thin | Coverage exists indirectly or through only a small number of cases. |
| None | No clear canonical coverage found. |
| Surface | Status | Coverage | Runtime target | Notes |
|---|---|---|---|---|
| Fixed root roles, presence-based entries and compiler-owned entry | Supported | Broad root-role combinations, closed filename rejection, root-local isolation, helper sharing across roots, dependency-sort, API-root runtime rejection, imported-root suppression, fragment-order and API-only artefact-filtering coverage. Targeted empty, static-only and metadata-only entries, zero-entry checks and entryless package builds, descendant-only HTML builds, single-file synthetic entries and compiler-owned entry Error! with exact source spans. | Frontend / HTML builder | A directory recognises only @mod.moth, @package.moth and @entry.moth as optional roots. Only @entry.moth owns dormant compiler-owned entry work with builtin Error!, and entry assembly activates it exactly once. Imported modules expose public interfaces without activating root work. API facades remain dependency-bindable and emit no HTML page artefact. A project with a project package surface and no entry compiles as an entryless package build target, while HTML build and dev still report the no-entry diagnostic. Entry changes do not alter API fingerprints. The generated caller records returned entry failure structurally and reports a fixed notice independently of Error.code. The entry has no source-level name, so start is an ordinary identifier that code may declare, call, export and import. |
| Structured diagnostics | Supported | Broad dependency, config, project-structure, syntax, type, rule, borrow, backend-feature and warning coverage plus targeted compiler-owned reason and primary/secondary source-remapping assertions. Synthetic discovery failures retain earlier and failed source snapshots under final identities without repeating preparation. Targeted mixed-cause transport, source/frozen ownership, failed-freeze retention and terminal/terse/dev classification coverage. | Frontend | User-facing failures are produced as typed DiagnosticDraft values and accumulated in DiagnosticBag. Boundary freezing builds compact DiagnosticStore records and TypeDisplaySnapshot data in reports, with read-only DiagnosticView family views. Foreign-site references use report-owned frozen identity-context references indexed by ForeignSiteRecord. Diagnostic codes and reason keys are stable identifiers, and each family descriptor declares its default severity. The three failure lanes are user-facing diagnostic reports, infrastructure failures and compiler-bug reports. Infrastructure uses InfrastructureFailure / InfrastructureErrors. The owning host renders each compiler-bug report once. Fatal CLI build, check and Boracle commands exit with status 2. moth dev renders the report, publishes the failed-build page and keeps watching. No legacy diagnostic model or adapter remains. |
| Diagnostic recovery and error budgets | Partial | Targeted coverage of ordinary-body recovery, module allowances, the work guard, the project cutoff and stop metadata. Default and explicitly disabled limits and in-process request isolation are covered by the |
Frontend / build system | Ordinary concrete function bodies each report their first primary error independently, bounded by the |
| Variables, assignment and lexical scope | Partial | Broad declaration, reassignment, mutability, structured-control-flow scope, shadowing, undefined-mutation and diagnostic coverage. Targeted new-binding collision cases cover parameters, range and collection bindings, collection source indices, range ordinals, option and choice captures and inline catches. Coverage includes local, parameter and capture matrices for file-visible aliases, traits, forward declarations and Core reservations, plus hidden-name and mutable-update positives. Concrete choice, pending generic-choice and pending optional-field captures have exact rejection sites and distinct checked owners. Focused CLI checks and all 2784 integration target results pass. Block catches and template binders share checked owners without dedicated collision cases. Explicit HIR definitions and updates cover place/value initialisers, caller-result binding freshness and all-results-before-writes multi-bind staging. Re-entered loop binders and body-local aliases have HTML runtime coverage. | JS / HTML | New-binding checks cover locals, source-visible values and nominal types, type aliases, traits, builtins, dependency bindings, prelude symbols, namespaces and reserved names. The existing guard and binding visibility cover aliases and traits, including forward declarations and Core traits, without a separate name registry. Hidden original names and namespace members remain unavailable as bare names. Existing single-place direct and compound writes require a leading ~ on the whole target, including fields and mutable receiver fields. Mutable alias declarations remain write-through. Multi-bind prefixes each existing target independently and preserves unmarked new declarations, once-only production and all-results-before-writes staging. Ordinary call-argument syntax retains its existing rules. Source/import collisions use MOTH-RULE-0002 at the authored name, with a previous-declaration label when the earlier binding has an authored location. Core trait reservations use MOTH-RULE-0039. Syntax-accepted multi-bind collisions reach semantic validation. Structured control flow owns lexical scope, and statically selected Bool branches retain their authored child scope before HIR. There is no general lexical-block construct or control-flow label. |
| Control flow | Supported | Broad branch, loop, break, continue and match coverage, including linked nested-helper returns and loop continuation with exact computed output. fixed_numeric_range_runtime covers exact integer and binary-float ranges on HTML and recoverable-failure rejection on HTML-Wasm. Constant and source-order range fixtures cover folding and evaluation order. Signed range and collection step fixtures cover positive, negative and omitted steps, wrong-direction and equal-bound outcomes, full-width endpoints, actual stepped collection indices, static and dynamic zero steps and const/runtime parity. Source scopes follow one physical-line opening and closing contract across functions, branches, loops, catches, choices and traits. Typed diagnostics cover nested openers, closers after code, trailing code, additional closers and unclosed constructs. Entry-start branches, loops, value-producing blocks and block catch handlers close with an explicit |
JS / HTML | Exact numeric range domains, signed steps and I32 indices follow Range loops. HTML-JS keeps 64-bit counters and steps exact through BigInt and delivers dynamic zero-step and float no-progress failures through the enclosing failure lane. HTML-Wasm lowers integer, F32 and F64 range counters, rejects F16 counters and rejects recoverable loop-step failure delivery rather than replacing it with a trap. |
| Assertions | Partial | Broad parser, diagnostics, HIR lowering, backend artefact and integration coverage. Dynamic default-message failures execute on HTML and instantiated HTML-Wasm with distinct Error and trap observations. Targeted final generated-demand coverage retains active message providers and removes literal-true validation-only sidecars and assets. | Frontend / HIR / JS / HTML / HTML-Wasm | assert is a statement-only language intrinsic. It is always checked, unrecoverable and accepts named/default typed messages. JavaScript and HTML evaluate reachable runtime messages lazily on the failure edge; HTML-Wasm accepts default, fully folded and unreachable literal-true runtime messages but rejects reachable runtime construction. Literal-true messages are fully type/generic/evidence checked and normalized, then replaced with typed none before HIR, so no TIR, runtime handoff, generated request or executable fact is published. Message construction cannot escape its evaluation through !, ?, return, break or continue. Authored propagation locations remain distinct from ordinary call mapping. assert(false) is statically terminal. |
| Functions and calls | Partial | Broad declaration, terminality, call validation, named and positional arguments, defaults, parameter passing, external calls and return coverage. | Frontend / HIR / JS / HTML | Named calls and defaulted parameters are supported. Source function and generic declarations are module-top-level only. A declaration header inside an executable body is rejected with a structured placement diagnostic. Non-unit success-return functions are validated for all-path terminality before HIR. External and compiler-owned builtin calls remain positional-only. Source-authored return-alias syntax has been removed. HIR signatures, calls and returns preserve ordered success slots separately from an optional error channel. Ordinary return preserves allocation identity, explicit copy creates independence and each call result receives a separate caller binding. Separate slots do not prove distinct allocation origins; current multi-return alias analysis keeps conservative root unions, which can produce stricter alias diagnostics. Never return contracts have a dedicated row. |
| Const functions | Partial | Required const declaration/call execution, deterministic work and allocation budgets, cross-module publication and release-only ordinary-function folding. | Frontend | `name #|args| -> Return:` declares a callable whose every call is executed at compile time. V1 admits immutable ordinary-value parameters and one ordinary success slot; runtime arguments, mutable parameters, fallible contracts and dependency cycles are rejected. Required calls execute the one prepared typed-AST body and never emit a const-only runtime symbol. Release builds optionally fold scalar-returning ordinary const-safe functions and retain runtime calls with a deduplicated Note when a configured budget refuses a candidate. Aggregate, String, template-bearing and unproven-provenance candidates stay at runtime. See @../functions/function-declarations (Function declarations) and @../constants/constant-folding (Constant folding). |
| Never return contracts | Partial | Broad frontend, HIR, borrow, Boracle, JavaScript and current Wasm coverage, including standalone-call placement, body-proof diagnostics, trait and external contract matching and defensive unreachable lowering. | Frontend / HIR / JS / HTML / HTML-Wasm | Source syntax is -> !. It is a whole callable contract, not a first-class type or Never TypeId. Calls are standalone terminating statements and cannot be consumed as values or continued with !, ?, catch or member access. Explicit contracts propagate through local, interned function types, cross-module, generic, trait and binding-backed surfaces. Core proof covers false assertions, explicit Never calls, normalised-true no-break loops, lexical scopes, branches and exhaustive matches. Recursive Never proof cycles are rejected with MOTH-RULE-0055 (invalid_return_shape.never_proof_depends_on_cycle), including cycles that close through a trait-bound call in a generic body. HIR uses HirFunctionReturnContract::Never and HirTerminator::NeverCall. JavaScript throws after the call. Current Wasm emits a zero-result call then unreachable. Ordinary typed functions may currently diverge without becoming Never to callers. Accepted proof gaps: direct and mutual recursion proof for declared Never bodies, richer data-flow proof of permanently true runtime loop conditions, and broader deterministic structural, SCC or whole-program non-termination proof. |
| Default arguments and field defaults | Supported | Broad function parameter and struct field default coverage, including exact declared types, omission versus explicit optional overrides, named and constructor default skipping and diagnostics. numeric_declaration_boundaries_runtime covers a full-range U64 field default. |
Frontend / JS / HTML | Function parameters and struct fields can define defaults with =. |
| Templates and style directives | Supported | Broad template parsing, directive, slot, const/runtime fragment, template control-flow, markdown inline-code, link-separator and explicit section-marker, diagnostics and JS/HTML integration coverage. Focused literal $doc and $code preservation, single-arm Bool and option inclusion, lazy loops, structural no-output, empty-string and whitespace slot replay, per-occurrence named defaults, named-slot wrapper composition, dependent const-loop headers over enclosing iteration and option-capture bindings, and normal-grammar rejection of removed template markers. Const and runtime template loops share the signed-step contract, including actual collection source indices, visited-iteration limits and const zero, no-progress and non-constant step diagnostics. |
HTML / JS | Main Alpha surface. Supported shapes include const and runtime templates, symbol-named slots with per-occurrence compile-time defaults, $in name inserts, $before / $after / $fresh routing, $md, $code, $raw, $html, $css and $escape_html formatters owned by the frontend and available under every builder, single-arm template Bool and option-present inclusion, template loops, runtime slot applications, dependency namespace member access in template heads and const expansion guards. Template [else], [else if ...], [break] and [continue] are removed and rejected by the ordinary grammar. Removed $slot(...), $insert(...) and $children(...) forms have no alias. The call spellings $code(...) and $css(...), and the $before = / $after = assignment spellings, are rejected in favour of one bare operand. False or absent conditions and zero-output loops suppress dependent wrappers. Structural output remains distinct from emitted empty strings, and slot replay preserves authored whitespace. Static $md headings and implicit $md in .mtf files use explicit @#id section markers for fragment IDs, and plain .md files keep their separate renderer without section markers. Post-TIR performance follow-ups remain accepted deferred implementation tracked below and in the roadmap. $code "moth" uses compiler-owned current word classification, lexical token roles and shared code presentation classes, and performs no semantic symbol resolution. Former dollar binding/parameter forms and $(source) interpolation receive MOTH-SYNTAX-0007 at the dollar marker, with lexer and source-case coverage. Recognised template directives remain supported in the current compiler. The
`$doc` and `$todo` are source annotations and `$note` is the only discarded
template comment, valid only as a template-body child. Presentation-only roles cover final-design into placement and canonical Dec scale names without reserving them, and a shared error role marks Moth ! alongside JS/TS throw/catch and Python raise/except. Template bodies stay plain authored text around highlighted heads and interpolations. |
Moth template .mtf content assets |
Partial | Targeted compiler-integrated dependency binding, synthetic content constant, markdown folding, explicit section IDs and marker diagnostics, direct API source snapshots and cross-document warning contexts, diagnostics and integration coverage. Directory, single-file and check-only units cover direct Moth template file values, qualified helper selection, the combined @core/html and @core/css prelude, builder parity and final source-identity rebinding. Collision fixtures name both prelude packages before consumer bodies evaluate. |
Every builder / frontend | .mtf is a fixed compiler-supported source kind under every builder, including custom SDK builders, and synthesizes one private compile-time content #String constant from an implicit $md template body. Headings, paragraphs and list items use explicit @#id markers for fragment IDs; unmarked blocks have none. Nested templates with no explicit directive also default to $md, and any explicit nested directive overrides that default. They bind extensionlessly into .moth, can be re-exported through a facade $export-marked direct-selection dependency clause, and must fully fold. Template bodies reach application values through qualified helper references and the fixed flat prelude from the official @core/html and @core/css Core/MothSource packages. Project-local packages, runtime values, types, private constants and imported aliases never enter it. Root-local declarations in @mod.moth, @package.moth and @entry.moth remain inaccessible. A qualified selection creates no name binding, while a real colliding binding keeps ordinary collision diagnostics. A public constant exported by both prelude packages is an internal header-binding failure that names both packages and the name before any consumer body evaluates. |
Plain Markdown .md content assets |
Supported | Broad parser, constructor, default, receiver, cross-file, borrow and diagnostics coverage. | JS / HTML | Source-authored receiver methods are statically resolved and belong to the same file as their nominal receiver type. External packages do not expose receiver methods. |
| Choices | Supported | Broad declaration, constructor, dependency, return, assignment, match, payload, JS carrier-shape and structural equality coverage. Targeted adversarial traces observe every loop variant, small/large nested-handler outcomes and successful/caught-error choice results. | JS / HTML | Unit and record-payload variants are supported. Payload fields are immutable. Accepted incomplete work includes direct payload field access with narrowing, nested payload patterns and recursive choices. |
| Pattern matching | Partial | Broad literal, choice, payload-capture, relational, guard, exhaustiveness, warning and value-if coverage. match_optional_u8_literal_pattern_success covers exact optional numeric payload patterns. Fixed-width and Byte typing fixtures cover range and category diagnostics. |
Frontend / HIR / JS / HTML | Literal patterns, choice variants, payload extraction, relational patterns, guards and else => arms work on HTML-JS. Option captures and declared choice payload captures remain valid, while general bare-name captures and String relational subjects receive diagnostics. Closed receivers support inline and block single-predicate value matches. Full relational overlap analysis and nested choice payload patterns remain deferred. Fixed numeric scalar patterns do not grant HTML-Wasm aggregate support. |
| Collections | Supported | Broad literal, mutation, indexing, loop, fixed-capacity, failure and diagnostics coverage, including multiline qualified choice constructors retained through header discovery. A deterministic fulfilment ledger checks stock conservation across repeated updates, partial requests, returns and caught helper errors. aggregate_late_u64_collection_runtime covers body-local numeric leaf inference. Concrete element mismatch fixtures reject storage widening. |
JS / HTML | Growable |
| Hash maps | Partial | Broad frontend, HIR, borrow, JS and diagnostic coverage. aggregate_late_u64_map_keys_runtime and duplicate-key fixtures cover numeric key inference. Float-key fixtures cover target rejection. |
JS / HTML / backend validation for other targets | HTML-JS supports insertion-ordered maps with fixed integer, Byte and canonical String-like keys, exact typed lookup and duplicate rejection. F16/F32/F64 and Dec keys remain unsupported. Numeric leaves follow Hash maps. Current contextual |
| Results, options, multiple returns and multi-bind | Supported | Broad options, propagation, catches, value blocks, multiple returns, multi-bind and diagnostics coverage. Single-value receivers reject zero or multiple success slots with factual arity diagnostics. success_shape_matching_multi_bind_runtime covers ordered, exactly-once production before target writes. grouped_multi_bind_call_group_runtime covers a parenthesised pending call accepted by a matching multi-bind. optional_propagation_contract_runtime covers HTML execution and pins the existing HTML-Wasm mutable-local-binding-alias gate's exact reason and source site. Both target assertions pass in the integrated gate. catch_fallback_u64_constrains_pending_arithmetic_runtime covers handler constraints. value_catch_unreachable_map_fallback_runtime covers HTML-Wasm handler pruning. |
Frontend / HIR / JS / HTML | HTML-JS delivers typed errors, options, private inferred failure lanes and authored safety catches with expression-wide recovery. HIR uses native ordered result slots and edge-defined success/error destinations rather than semantic tuples or fallible carriers. JavaScript packing stays at ABI boundaries. Postfix propagation keeps the enclosing callable contract in nested branches. Optional |
| Constants and compile-time folding | Supported | Broad constant, dependency sorting, template, numeric, const-record, external constant, config and diagnostic coverage. numeric_module_constants_generic_identity_runtime covers imported exact identities. Constant inference boundary fixtures reject later retyping. |
Frontend | Constants fully fold and resolve numeric types at their declaration boundary. Later runtime receivers cannot retype them. Numeric folding retains exact types and configuration provenance and diagnoses known failures at the authored operation. Const records remain compile-time field groups, with exported and imported folded records supported. Anonymous const records use named-only entries and permit nested folded records without declaring constructable types. See Constants. |
| Type aliases | Partial | Broad builtin, imported, collection, option, generic instance, alias-to-alias, remap, fixed-capacity constant, trait-requirement and diagnostic coverage. | Frontend | Transparent aliases to builtins, source and imported source types, collections, maps, options and concrete generic instances are supported, including targets whose fixed collection capacity folds a module constant. Alias targets keep local nominal identity through generic materialisation. The compiler still rejects aliases to external opaque types despite the accepted transparent-alias contract. |
| Arithmetic, explicit casts and copy | Partial | Broad arithmetic, cast, folding, copy and diagnostic coverage. numeric_equal_type_arithmetic_matrix and numeric_mixed_type_arithmetic_matrix cover result domains. Narrow I8/U8 failure and F16 completion fixtures include release parity. numeric_semantic_physical_variants_debug covers HTML/HTML-Wasm scalar parity. |
Frontend / HIR / JS / HTML / HTML-Wasm | The exact scalar, Dec, Byte and plain cast contracts are delivered through the frontend and HTML-JS. Numbers and Casts own defaults, result domains, precision and evidence. Cast failure follows ordinary local recovery, private inference or compatible Error! delivery. Copy retains runtime independence. HTML-Wasm executes supported exact scalars, comparisons, formatting and infallible numeric casts, with conservative integer proofs removing only discharged checks. It rejects recoverable numeric failure and every user aggregate holding a fixed scalar before lowering. Dec values, statement casts, unsupported conversions and foreign calls remain target-gated. F16 computation carriers do not widen its semantic precision. Const Error materialisation and branching const catch handlers remain deferred. |
| Binary-float formatting and boundary validation | Partial | Broad folding, formatting and foreign-boundary coverage. external_fixed_scalars_int32_float64 covers exact F32 annotations, rounding and foreign failure delivery. Backend tests cover all finite F16 formatter encodings, F32/F64 boundary bits, wrong carriers, signed zero, subnormals and non-finite guards. |
JS / HTML / HTML-Wasm | HTML-JS formats exact binary floats and validates foreign results at their declared F16/F32/F64 precision without coercing non-Number carriers. HIR retains the exact type through raw and validated success slots. Integrity guards do not become catch producers without a source-declared Error! contract. HTML-Wasm formats supported F16/F32/F64 scalars and lowers trapping F32/F64 guards, while F16 validation, recoverable guards, foreign calls and String-to-numeric parsing remain target-rejected. Annotated JavaScript signature support belongs to Packages and Builders. |
| Type checking and coercion | Supported | Broad compatibility, receiver, call, return and diagnostic coverage. scalar_late_u64_full_literal_receiver, scalar_receiver_conflict_deterministic and generic signature fixtures cover bounded inference and authored-order conflict witnesses. |
Frontend | Body-local numeric inference resolves literal origins through known scalar, field, collection, map and generic signature receivers before I32/F64 defaulting. Concrete boundaries remain exact. Cast targets do not constrain their source and completed named arithmetic does not infer backwards. No pending type crosses a body or module boundary. See Numeric literals. |
| Traits | Partial | Broad declaration, conformance, visibility, generic-bound receiver-call, trait-name rejection, core cast trait metadata covering all eleven fixed numeric targets, incompatibility metadata, public API leak and diagnostics coverage. | Frontend static semantics | Static trait declarations, explicit same-file nominal conformances, reusable evidence, trait incompatibility metadata and generic bounds are implemented. Requirement and conformance matching include the whole return contract, so -> ! matches only -> !. Accepted incomplete work covers static non-method requirements, additional compiler-owned builtin conformance families and a broader standard trait taxonomy that remains static. |
| Strings, coercion and IO/template boundaries | Partial | Broad quoted-escape, string-content coercion and IO/template rejection coverage, plus targeted external StringContent signature coverage. |
Frontend / JS | Quoted strings decode only \\, \", \n, \r and \t. Invalid escapes are rejected by the tokenizer. Template heads and reusable external string-content signatures accept supported string values. Console helpers such as io.line(...) use the same boundary, so complex values must be extracted or interpolated into templates before output. AST rejects source String + String and no longer folds compile-time string addition. Runtime equality compares String content across construction origins; HTML-JS compares primitive String map keys by content and HTML-Wasm compares finalized string bytes. Accepted design rejects source string concatenation with +; templates remain the canonical concatenation form. |
| Borrow validation and local last-use analysis | Partial | Production and Boracle source tests cover alias conflicts, CFG joins, loops, call effects, update legality, optional transfer and reference/oracle differential cases. | HIR analysis / all backends | Production access checking is mandatory and currently uses the alpha checker. The live verified implementation inventory, performance evidence, accepted production decisions, Boracle gaps and next work are maintained in @https://github.com/nyejames/moth/blob/main/docs/roadmap/plans/production-borrow-checker.md (the production borrow checker tracker). |
| Result provenance and retention summaries | Partial | Targeted local return-alias, unknown-result and fresh-result summary tests. | HIR analysis / link planning | Complete per-result, detached-storage, retained-parameter, outlives, cardinality, whole-domain kill and outcome-sensitive retention summaries remain unfinished. The borrow-side implementation detail and active handoff are tracked in @https://github.com/nyejames/moth/blob/main/docs/roadmap/plans/production-borrow-checker.md (the production borrow checker tracker). |
| Lifetime-region and escape validation | Deferred | None | Backend-neutral design | Accepted architecture exists; no implementation owner has landed. This validation is mandatory in the accepted design, and no backend or profile may bypass it. Complete when mandatory local and link topology proof is implemented. |
| Retained-edge liveness and cleanup frontiers | Deferred | None | Backend-neutral design | Accepted design only. Covers retention domains, edge creation, whole-domain kill effects and path-sensitive final cleanup frontiers. Builtin collections do not expose clear or compiler-known retention effects outside maps. Complete when whole-domain effects, frontiers and epochs are implemented. |
| Compiler-generated intervals and region epochs | Deferred | None | Backend-neutral design | Accepted design only. Inferred regions must be non-lexical CFG intervals rather than lexical scopes, with repeated population and teardown forming region epochs. Complete when non-lexical interval inference and epochs are implemented. |
| Declared regions (`name:` / `into name`) | Deferred | Targeted lexer, statement-classification, deferred-diagnostic, anonymous-declared-region rejection and reclaimed-identifier coverage. | Frontend / HIR / lifetime analysis / all backends | Valid name: headers are reserved in executable statement position and report a deferred-feature diagnostic. Exact _: is rejected. Full declared-region parsing, into name placement, HIR metadata, topology and backend support remain deferred. Declared regions are hard count-free bulk lifetimes whose owned storage is never released individually. |
| Direct source-created reference cycles | Deferred | None | Frontend / lifetime analysis / all backends | Accepted design only. A declared region is the only source mechanism for reference cycles, and inferred-region analysis never invents a cyclic region. Complete when direct source-created cycle construction and bulk cleanup are implemented. |
| Affine Ownership ABI | Experimental | Targeted Wasm ownership-projection and conditional-drop coverage. | Wasm | Present but not part of the Alpha stability promise. Borrow-checker advisory drop sites currently emit Wasm DropIfOwned directly under current scaffolding, and the LIR carries a reserved retain instruction. This direct path is migration debt, not accepted final architecture. Complete when memory-plan-driven full-control lowering replaces it. |
| Memory-strategy planning | Deferred | None | Backend-neutral design | Accepted design only. A distinct compiler-owned planner must select stack, inline, affine, inferred-region, declared-region, REC or host garbage-collected representation per allocation family after topology is proven, and must also produce the concrete per-family obligation transitions the backend encodes. A missing strategy after successful validation is a InfrastructureFailure in the accepted design. No ValidatedMemoryPlan implementation owner exists. Complete when the planner owns every strategy decision and its plan is validated before lowering. |
| REC analysis and selection | Deferred | None | Backend-neutral design | Accepted design only. Retained Edge Counting is a compiler-selected physical representation for runtime-many persistent retained edges, never source semantics. The canonical contract lives under `docs/developer-docs/memory-management/retained-edge-counting/`. Complete when the companion analysis and its decision reporting are implemented. |
| REC backend lowering | Deferred | None | Full-control backends | Accepted design only. Covers the two-bit tagged handle ABI, selective inline counters, count transitions and iterative destruction. Complete when tags, counters, collections and iterative destruction are implemented. |
| Field-sensitive allocation splitting | Deferred | None | Backend-neutral design | Accepted design only. Projections currently remain rooted in their containing allocation family. Complete when split analysis and strategy rerun are implemented. |
| Inferred-region and declared-region backend lowering | Deferred | None | Full-control backends | Accepted design only. Wasm runtime memory currently provides basic linear-memory page and heap-base planning with no allocator, inferred-region, declared-region or destruction-plan support. Complete when inferred-region allocation with complete exits and declared-region bulk cleanup are implemented. |
| Physical coalescing | Deferred | None | Backend-neutral planning / full-control backends | Accepted optional optimisation only. Physical coalescing may keep storage slightly longer than the maximally precise semantic interval, but it never widens semantic topology or changes diagnostics. Complete when the narrow straight-line heuristic is implemented and verified. |
| Builder lifecycle regions | Deferred | None | Project/link planning / full-control backends | Accepted design only. Page, mount, request, frame and arena roots must participate in ordinary lifetime-topology validation for retained builder-owned storage and future observation or event lifecycles. Complete when builder lifecycle roots instantiate validated topology and memory plans. |
| Collector-free release verification | Deferred | None | Full-control backends / project builders | Accepted design only. Backends must declare collector-free release capability, and a capable backend must not fall back to a tracing collector. This is a backend capability and an artefact property, never a source-visible or project-visible mode. Complete when a capable backend proves no tracing runtime remains. |
| Channels | Deferred | None | Async / lifetime planning / full-control backends | Accepted prerequisites are mandatory affine transfer on successful send, responsibility preservation on failed send, bounded channel or task lifetimes, independent graphs across task boundaries and non-atomic REC under the cooperative task model. The future form `reader, writer Channel of AppMessage = Channel()` has directional endpoints but no compiler or runtime implementation; omitted initialisation is unsupported. Complete when the final memory prerequisites and a separate channel implementation plan are accepted. |
| Wiring parameter contracts | Supported | Broad integration coverage for contract parsing and positions, Wire origins and forwarding, route formation, captures, forwarding, generic and imported routes, borrow interactions and target gates. | JS / HTML; HTML-Wasm for Wire only | |
| Debug and GC-native representation parity | Partial | Broad JS pipeline coverage; no cross-backend memory parity suite. | JS / host GC | The JS backend uses host collection for already-legal topology, which is accepted behaviour for a GC-native target. Accepted incomplete work: parity currently rests on borrow validation alone because lifetime-topology validation is deferred, so the shared legality guarantee is not fully enforced. Complete when debug, GC-native and collector-free paths demonstrably share source legality and observable behaviour. |
| WIT value-only component integration | Deferred | None | Frontend / build / backends | Accepted closed external-boundary profile; no current import validator or runtime integration. |
| Paths and dependency clauses | Supported | Broad source dependency, namespace, flat direct-selection, binding-backed package, public-surface, module-boundary, collision, continuation-diagnostic and legacy-import-migration coverage. | Frontend / HTML builder | Source and module namespace records are shallow. External package namespace records support nested symbol paths such as io.input.new and io.input.Input. Direct symbol-path dependencies remain rejected. Cross-module and source-backed package access goes through the target root's $export public surface. |
| Qualified expression references | Supported | Targeted ordinary expression, nested template, .mtf, same-name local, selected-name non-binding, helper-next-to-all-roots, cross-module constant, generic body, callable and constructor suffix, direct cycle, self-cycle, mixed-format cycle and invalid provider coverage. Missing .moth and .mtf targets, runtime values in .mtf, entry-only children, root-local declarations and unassigned top-level calls report typed diagnostics. |
Frontend / HTML builder | A |
| File paths in value position | Supported | Broad prepared-reference and Stage 0 physical-input resolution, fixed-point content discovery, AST String/file-kind semantics, structural Resource/SiteRoot flow, public/generated/service boundaries, provider JS identity, output-link planning, boundary, symlink, missing-watch, config-rejection and ordinary user-defined Path coverage. |
Frontend / HTML builder | Every physical-target-bearing non-dependency path token is classified during retained preparation and resolved once during Stage 0. Referenced .mtf and .md sources extend preparation to a fixed point; ordinary resources produce byte-free physical input and watch records; SourceKindNoFileValue for .moth plus extensionless and site-root rows remain no-physical-target outcomes for AST. AST interprets published outcomes as ordinary String values, including structural Resource/SiteRoot pieces. Direct .mtf compilation consumes the same Stage 0 facts, provider JS assets share resource identity and IO authority and CSS validation preserves opaque anchors. Config bootstrap rejects file-value paths. The superseded source-visible Path type is gone, so Path is an ordinary user identifier. |
| Logical expressions | Supported | Broad precedence, grouping, invalid operand, not, comparison, short-circuit and JS operator mapping coverage. | JS / HTML | Keep short-circuit behavior covered through artifact-shaped tests. |
| If statements and conditions | Supported | Broad condition validation, nested condition, Bool requirement, same-line else-if rejection and JS lowering coverage. | JS / HTML | Conditions require Bool unless the specific syntax is an option or match-style selector. |
| Char | Supported | Broad success coverage with targeted diagnostic coverage. | JS / HTML | Additional malformed-char diagnostics are cleanup, not a core Alpha blocker. |
| Named arguments and call-site mutability | Partial | Broad function-call, constructor-call, duplicate, unknown, missing, ordering and tilde diagnostics coverage. | HTML-JS / HTML-Wasm | Fresh rvalues can satisfy mutable parameters without ~. Existing places still require explicit ~. HTML-JS preserves normal write-through; HTML-Wasm rejects reachable mutable function parameters because its call-argument ABI has no writable argument slot. |
| Surface | Status | Coverage | Runtime target | Notes |
|---|---|---|---|---|
| Project config model | Supported | Targeted grouped-record, builder-schema, input, static-specialisation, provenance and boundary coverage. Builder sections retain independent same-named values, defaults and authored spans. Surface validation accepts plain or singly optional String/Bool section fields and rejects unstorable shapes, nested optionals and duplicate output-root owners before config compilation. config_contract_u32_success covers a source U32 contract. build config tests covers receiving-width materialisation, deferred range failures and direct F16/F32 midpoint rounding. |
Frontend / build system | Grouped project and active builder records remain the implemented config surface. $config inputs accept every fixed integer and binary-float contract. Command numbers retain literal spelling until the exact receiving contract materialises them. Typed inputs preserve their exact identity. Build, check and dev share input handling, immutable @project fields, provenance and semantic fingerprints. Ordinary static if consumes folded Bool values before HIR. |
| Selected-directory project root | Supported | Directory commands compile the selected directory as build and source root. Missing |
Build system / CLI | Optional normal, support and entry roots compile in one transaction with isolated root scopes and atomic optional-interface publication. Source-package and project-package surfaces select the declared API surface. HTML |
| Source directives | Supported | Supported source-attachment, same-line and separate-line runs, duplicate, dangling, wrong-target, facade-placement, declaration-shell placement, unclosed-operand rejection, compile-time String operand and declaration-attached |
Frontend |
See Directives. |
$config contracts |
Supported | Targeted explicit input, fallback and absence, exact-type, numeric-materialisation, duplicate and boundary coverage. |
Frontend / build system | $config marks one explicitly typed top-level # binding in @config.moth or a selected source module. The binding name is the input key, the declared type is the contract and the initializer is the fallback. Only marked bindings may omit an initializer. Explicit-only providers; project fields never implicitly supply inputs. |
Structural $feature selection |
Deferred | None | Frontend / build system | Accepted direction, not ordinary static if. Pre-graph source selection and config-only feature declarations wait for a separate design. Multi-builder projects depend on this. |
| Struct layout directives | Deferred | None | Frontend / target validation | Accepted direction for compiler-owned $layout representation constraints. Nominal identity stays unchanged. Not implemented and not a C ABI or SoA commitment. |
$export migration |
Supported | Targeted declaration, dependency, adjacency, operand, placement, facade-role, receiver/receiver-method, conformance, private-surface and ordinary-identifier coverage across parser, renderer and integration suites. | Frontend | Compiler-owned $export is the only public-surface form in @mod.moth and @package.moth. It marks one eligible declaration or direct-selection dependency clause, stays private by default, and is rejected in entry roots, ordinary helpers and config. The legacy export: block and reserved keyword are removed; export is an ordinary identifier. |
| Alternative root purposes | Deferred | None | Frontend / build system | $test is a later non-page purpose after currently queued work. No runner, command or lifecycle is defined. Entry eligibility is owned by the @entry.moth root role. |
| Directive block spellings | Deferred | None | Frontend | Future compiler-owned blocks use $async: and $checked:. Recognition of those names is not semantic implementation. Checked deep-proof algorithms remain an open proposal, not accepted Alpha work. |
| Numeric constraint directives | Deferred | None | Frontend | $fast_math, $safe_math and $infallible are unimplemented compiler-owned numeric constraints. Ordinary arithmetic remains checked; their exact contracts remain queued design. |
| Surface | Status | Coverage | Runtime target | Notes |
|---|---|---|---|---|
| Collection methods | Supported | Broad JS helper, split growable and fixed push helpers, fallible get/set/remove and fixed push, infallible growable push and length, growable handling rejection, fixed overflow, removed indexed-write, bounds and mutable-receiver coverage. | JS / HTML | Collection get, set, push, remove and length are compiler-owned members. Mutating calls, including both push forms, require explicit mutable receiver access. One source spelling push(value) resolves from the receiver's collection shape: growable push is infallible and rejects ! or catch handling, while fixed push is fallible only when the collection is full and requires ! or catch. The JS runtime exposes separate growable and fixed helpers; HTML-Wasm collection lowering remains deferred. |
| Receiver methods | Supported | Broad same-file struct/choice receiver, aligned generic receiver, imported generic receiver, namespace receiver type, module-boundary exposure, nonlocal/builtin/external receiver rejection, duplicate, collision and mutability coverage. Mutable self calls and nested collection-field mutation execute through reserved receiver roots. Invalid mutable operands retain the offending token's exact span. | JS / HTML | Source-authored receiver methods travel with values of their receiver type, including retained generic receiver templates across module and package boundaries. They are never selected independently, aliased or exposed as namespace-record fields. |
| Fallible suffix handling | Supported | Broad propagation, shared then catch recovery, catch handler, template-boundary, explicit HIR Invoke, direct-return, call-argument, receiver-base, match-guard and obsolete HIR propagation-expression removal coverage. | Frontend / HIR / JS / HTML | Fallible calls and operations lower through an Invoke terminator with mutually exclusive success/error edges: ordered success destinations are defined only on success and one disjoint error destination only on failure. Value-producing catch recovery joins individual slots through ordinary CFG targets. Propagation transfers the error channel without tuple or payload extraction. Collection and map fallible members and resolved fallible cast conversions use the same selected failure context. |
| Builtin Error type | Supported | Broad constructor, default, public-field, source/Core/foreign recovery and range-rejection coverage in error_code_u32_runtime and companion error_code_u32 fixtures. MON public numeric tests covers U32-schema round trips. |
Frontend / JS | Public fields use message String and code U32 = 0. HTML-JS preserves the full unsigned code through construction, propagation, recovery and foreign projection. HTML-Wasm rejects reachable Error values. Hidden location/trace metadata remains backend-internal. |
| Surface | Status | Current role | Alpha rule |
|---|---|---|---|
| HTML-Wasm | Experimental | The experimental backend executes selected scalar and page-fragment paths through the shared HTML builder slot/hydration contract. numeric_semantic_physical_variants_debug records current scalar parity, not future aggregate support. |
Keep behind --html-wasm. Tests may pin current behavior, but Alpha support is JS / HTML. |
| Wasm backend | Experimental | Long-term backend direction with current HIR-to-Wasm-LIR lowering, runtime contracts, request validation, debug output and binary emission work. | Do not count Wasm support as an Alpha blocker except for clean diagnostics and no-panic guarantees on covered paths. |
| Wasm payload/runtime parity | Experimental | numeric_semantic_physical_variants_debug and its release companion cover exact scalar parity. fixed_width_aggregate_byte_runtime covers HTML-JS execution and HTML-Wasm aggregate rejection. native_four_mixed_results_runtime passes four native ordered I32/F32/I64/F64 results on HTML and HTML-Wasm. Internal real lowering and emitted Node observer tests own ABI types, permuted destinations and one producer invocation. The F32 value 1.25 does not prove rounding, while 9007199254740993 exposes I64 precision. Fallible Invoke and error-typed signatures remain target-gated. Recoverable numeric, compound write-back and range failures receive capability diagnostics before lowering rather than trap fallbacks. Supported scalar paths include exact comparisons, unsigned boundary formatting, selected infallible casts and F16 rounding. Emitter-only compact-storage tests do not establish source aggregate layout. Runtime Bool interpolation remains a separate gap. Reachable mutable parameters and local binding aliases, optional alias/variant paths, Error values, Dec, foreign calls and unsupported casts remain target-gated. See mutable_local_alias_wasm_rejected and mutable_local_self_update_wasm_supported for the alias distinction. |
Backend parity progress belongs here, not repeated in every feature row. |
| Surface | Status | Coverage | Current status |
|---|---|---|---|
| MON standalone Rust codec | Partial | Broad public API, codec and bounded hardening coverage. MON public numeric tests covers all eleven exact scalar identities, Byte, F16 edge bits, signed zero, U32 Error fields and retained Integer/Decimal values. MON/source syntax parity tests distinguishes shared syntax from data-only capabilities. |
The standalone moth-mon crate and moth::mon re-export expose one Rust-only codec with explicit schemas, exact-width values, immutable prepared defaults, strict field/choice/map routing and bounded failure handling. Integer and Decimal remain lossless data families. Fixed float ingress rounds directly at its declared precision. MON owns the schema and data contracts. Shared lexical rules retain reserved-name and entry-spacing validation, with |
| Moth-native MON integration | Deferred | None | Separate accepted follow-up for compiler-owned $mon convenience, schemas derived from ordinary Moth types, checked anonymous-record generation, source/runtime encode/decode operations and the static .mon asset builder. Exact directive and command syntax remains undecided. Unicode escapes and contextual ::Variant construction remain undelivered despite their availability in MON data. |
| Frontend Arena + Semantic Invariant Optimisation | Partial | Broad benchmark, profiling, adversarial-fixture, scope-frame, capacity-estimate and historical validation coverage. Focused typed-store tests cover checked extents, owner isolation, compaction, detached generic preparation and owned service/diagnostic lifetimes. | Implemented pieces include token/header statistics, conservative capacity estimates, scope-frame arenas and seeding, external registry clone reduction, dense HIR and phase-owned typed expression stores. The typed-store, native result and lifetime work is complete. Call-site descriptors and the generated registry are shared, authored types resolve directly to TypeIds and selected range domains are reused, which cuts generic-scaling check time by 17–28%. Broader template/render-plan, bump-allocation and persistent-cache work remains deferred. |
Static Bool if specialisation |
Implemented | Frontend pipeline, HIR boundary, terminality, branch scope, inactive diagnostics and generated-request coverage. | Both branches remain frontend-valid. A known Bool selects one compiler-generated lexical scope before terminality, durable generated work and HIR. Runtime conditions retain ordinary branch lowering, and source structure never depends on the condition. |
| Surface | Status | Coverage / diagnostic direction | Notes |
|---|---|---|---|
| Expression-wide catch and private implicit propagation | Partial | Broad JS/HTML private propagation, arithmetic, cast, compound write-back, source-order and handler-failure coverage. implicit_failure_nested_argument_call_catch_rejected pins the call-count boundary. catch_unreachable_handler_invalid_cast_rejected pins source validation. value_catch_unreachable_map_fallback_runtime pins HTML-Wasm pruning. |
HTML-JS delivers private no-slot failure propagation, builtin Error! materialisation and expression-wide recovery. Catch and recovery owns authored safety eligibility, call-count levels, compatible error types and placement. Handlers contribute constraints and undergo full source validation, then disappear only after relevant failure summaries converge. Pruned handlers publish no executable HIR, generated request or backend requirement. Handler failure goes outward. Fatal assertions and integrity guards remain unrecoverable. HTML-Wasm rejects recoverable numeric failure rather than using trap fallback. |
| Export and custom-error discharge diagnostics | Partial | Structured boundary coverage includes direct and multi-hop failure, bounded chains, custom error slots, receiver methods, re-exports and package facades. Self- and mutually recursive helpers whose recursive call precedes the overflow keep the actual operation and cause code at concrete and dormant generic boundaries, and origin-free recursion stays infallible. A later generated request reuses the converged summary; escaping templates are rejected at the declaring dormant boundary before any request materialises. | Exported no-slot and custom E! boundaries reject escaping implicit failure before publication. The diagnostic labels the boundary, at most three private call hops and the originating operation, with typed builtin cause codes and an elided-hop count. Deterministic witnesses skip recursive back-edges while searching for an available origin, preserve donor source ownership and never treat a missing summary as infallible. A cross-module/external leaf stops the witness without inventing an origin. Repair by adding builtin Error! or recovering/mapping locally. Deliberate assertion remains an explicit choice. A compound write-back witness names the target type rather than the handled right-hand side. |
| Start Error! and success-only HTML fragment publication | Partial | JS/HTML cases cover implicit and propagated entry failure, code-zero failure, local recovery, ordered once-only success and suppression of all invocation-owned runtime fragments after failure. The execution harness records failure at the generated entry call. | The compiler-owned entry has builtin Error!. Compatible postfix ! works at the entry body root and in nested branches. Incompatible custom errors require explicit recovery. HTML publishes runtime fragments only after success, preserves static HTML and earlier explicit IO, and shows fixed safe release text instead of application Error HTML after failure. The terminal reports a fixed notice and unsuccessful execution independently of the error code. See Dev entry-error reporting for the moth dev view. |
| Dev entry-error reporting | Supported | Dev-server and generated-bootstrap tests cover returned Errors including code 0, assertion and unexpected startup-fault categories for JS and HTML-Wasm, hostile text, stale, duplicate, malformed, oversized and cross-origin reports, origin prefixes, unavailable transport and isolated pages. A release case proves output has no dev reporting dependency. Barrier tests cover output publication against concurrent requests, companion requests spanning a rebuild and write failure. A real rebuild/write/serve sequence over one output directory proves current output freshness through private-body entry-outcome changes, an invalidated success-only export and unchanged writer skips. Cache-reuse invalidation remains untested because no cross-build semantic or physical artefact cache exists. | In moth dev, a returned entry Error covers its page with a runtime view that keeps hot reload, logs to the console and reports once to the server terminal. A successful build stays successful for every page. Assertion failures are identified structurally and other faults escaping the generated startup wrapper are reported as unexpected startup faults. Later callbacks and unrelated scripts are not intercepted. Each served response comes from one completed output generation; a page whose companions load after a rebuild has its reports rejected as stale and reloads normally. |
| Post-TIR template performance follow-ups | Deferred | Not part of the current Alpha surface. | Deferred items are source-span-backed template body text, a per-template parse cache, a formatter-output cache, dev-mode source-hash keyed template reuse, dependency-aware invalidation for imported consts, formatter algorithm rewrites if profiling justifies them, incremental module/template compilation after module-boundary incremental builds exist and parallel nested-template folding after a separate profiling-backed plan. |
Range values outside loop headers |
Deferred | Loop-header ranges are covered with the loop surface. One targeted case pins that a folded Range constant survives to HIR; the operations a range would need are not covered because they are not implemented. |
start to end is a loop-header form. A Range can be bound, including as a # constant, which folds and lowers, but the bound value is inert: it is not a collection-loop source, exposes no start / end members and is not renderable in a template head. First-class range values are intended but not designed or implemented, so do not add coverage for range operations until the surface is shaped. |
| Choice payload field access | Deferred | Targeted direct-field-access diagnostic coverage. | Use pattern matching to extract payload fields until variant narrowing/refinement is designed. |
| Choice nested payload patterns and richer exhaustiveness | Deferred | Targeted nested-pattern deferred diagnostics. | Exhaustiveness is checked at tag level. General pattern binding renames are also deferred outside choice payload capture renames. |
| Choice recursive types | Deferred | Targeted recursive declaration deferred diagnostics. | Requires layout and indirection design. |
| `as` keyword domains | Supported | Targeted success and invalid-position diagnostics. | as is valid for type aliases, dependency namespace/direct-selection aliases and choice payload capture renames. Other positions are rejected. |
| API facade export/re-export syntax | Supported | Targeted authored declaration and dependency export, flat direct-selection re-export, alias, source/external symbol, privacy, duplicate, placement, directive adjacency/operand and receiver/conformance rejection coverage. Root-local and entry-root export rejection, pure one/two-hop Moth facades, external Call/Invoke runtime demand without callable Moth wrappers and dormant-root non-activation are covered. | Only @mod.moth and @package.moth accept per-item $export for public authored declarations and flat direct-selection dependency re-exports. Entry roots, helper files and config reject it. Bare namespace exports, wildcard exports, function alias values and automatic method re-export through type aliases are rejected. |
| Generic type infrastructure | Supported | Broad TypeId, nominal instance, alias, constructor, dependency, HIR validation, trait-bound and diagnostic coverage. Generic applications preserve following parameter and field separators, including shared and mutable receivers and multi-argument applications. | Generic structs, choices, concrete aliases, generic free functions, aligned generic receiver methods and trait-bound validation use canonical TypeId identity before HIR. |
| Generic functions | Partial | Broad declaration, body validation, inference, instantiation, module-boundary dependency, frozen provider semantic-closure defaults and namespaces, nested private receiver materialisation with forwarded receiver bounds and evidence, diagnostics, fallible return and non-value-use coverage. Targeted numeric-origin cases cover later receivers, exact and partly solved result envelopes, mutable scalar targets, typed errors, inactive handlers and inference exclusions. | Generic free functions and aligned receiver templates infer ordinary types from immediate evidence. Declared parameter/result relationships can carry existing numeric origins to eligible later body-local receivers. Known result leaves retain their exact type while unresolved leaves await completion. Bounds and cast evidence validate after type selection, and only concrete requests reach materialisation. This adds no general later-result inference, callee-body search or outer-parameter forwarding into nested calls. Explicit call-site type application remains outside the inference-only rule. Never generic calls infer from arguments only because they have no result shape. |
| Trait bounds on generics | Partial | Broad declaration-site bound, value-carried evidence, module public-surface privacy, receiver-call, nominal generic instance and negative diagnostic coverage. | Bounds use is. Concrete generic calls and nominal generic instances require reusable evidence. Core cast bounds derive pair-scoped evidence on demand with exact fallibility. Retained requests freeze canonical identities without mutating the frozen requester. |
| Recursive generic types | Deferred | Targeted recursive generic type diagnostics. | Requires layout and indirection design. |
| Nested generic type application | Deferred | Targeted nested of diagnostics and alias workaround coverage. |
Name intermediate concrete aliases instead of writing nested inline generic applications. |
| Exact numeric types and bounded inference | Supported | Broad scalar, aggregate and generic source coverage. scalar_receiver_conflict_deterministic and its reversed witness fixture cover diagnostics. generic_numeric_signature_late_receivers_runtime and generic_constructed_numeric_retention_runtime cover signature and direct-constructor constraints. Arithmetic matrices and release companions cover exact result domains and operation completion. |
The frontend and HTML-JS deliver the accepted exact numeric contracts, including bounded body-local inference, declaration-owned constants, known collection/map leaves and generic signature/direct-constructor receivers. Empty containers and non-numeric unknowns gain no general later-use inference. Config, MON and Core packages use exact contracts, with their separate rows recording coverage. HTML-Wasm support remains limited to its recorded scalar paths and explicit gates. |
This matrix should stay concise and current.
CONTRIBUTING.md.docs/roadmap/roadmap.md.docs/docs/**.docs/compiler-design-overview.md.