Skip to main content

Crate nova_typeck

Crate nova_typeck 

Source
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§

CheckOptions
What check_with does beyond checking.
CheckResult
Result of type checking one file.
Member
A field or method completion can offer after ..
ProbePoint
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).
ProbeResult
What the probe found (spec §4.1, §4.2). Each part is empty when the probe’s place holds nothing of its kind.

Enums§

MemberKind

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 (spec docs/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_ty for hover (spec 3.4a §3.4): type parameter i prints as names[i], and an unsolved variable or an error as _.