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§

ParseSite
Stable identity of a call site inside a checked program (#777).
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).
rewrite_parse_calls
Apply the parseparse_strict_typed / json_bodyjson_body_typed rewrite recorded in pt to stages.