Skip to main content

Module checker

Module checker 

Source
Expand description

M3: type checker. Walks the canonical AST, infers types via unification, and checks declared signatures and effects.

Structs§

ProgramTypes
Result of checking a whole program.

Functions§

check_and_rewrite_program
Type-check stages and rewrite every module.parse(s) call where the inferred T is a Record into the equivalent module.parse_strict(s, [field_names]) (#168). Existing check_program keeps the old immutable signature for tests and tools that don’t want the AST rewritten.
check_program
check_program_with_positions
Variant of check_program that stamps a source Position onto every emitted error (#306 slice 1).