Expand description
Type checker and inference for the Nova compiler.
Implements the Phase 1 subset of nova-spec/12-TYPESYSTEM.md:
Hindley-Milner style unification with explicit generics at function
boundaries (no let-polymorphism), sum types with Maranget-based
exhaustiveness/reachability checking, and desugaring of the AST into typed
HIR (nova-hir).
Literals are typed concretely (Int / Float), so the spec’s numeric
defaulting step is a no-op in this implementation.
Trait resolution, records, closures and async are later Phase 1/2 steps;
encountering them reports an E0900 “not supported yet” diagnostic
rather than panicking.
Structs§
- Check
Options - What
check_withdoes beyond checking. - Check
Result - Result of type checking one file.
- Member
- A field or method completion can offer after
.. - Probe
Point - Where the language server’s probe looks: a byte offset in one file (spec
docs/superpowers/specs/2026-10-08-phase-3-2-lsp-core-design.md§4.1). - Probe
Result - What the probe found (spec §4.1, §4.2). Each part is empty when the probe’s place holds nothing of its kind.
Enums§
Functions§
- builtin_
text - A builtin’s signature for hover (spec 3.4a §5.1), its type parameters
as
T,U, …:fn print(String) -> (). - check
- Type-check a parsed file against its resolved definitions.
- check_
with check, with the language server’s probe (specdocs/superpowers/specs/2026-10-08-phase-3-2-lsp-core-design.md§4.1).- display_
ty - Render a type for use in diagnostics, resolving sum-type names.
- display_
ty_ named display_tyfor hover (spec 3.4a §3.4): type parameteriprints asnames[i], and an unsolved variable or an error as_.