pub fn check(package: &Package, program: &Program) -> Vec<Diagnostic>Expand description
Type-checks a resolved program.
Every module is checked against its own declarations, the declarations it
imported, and the builtins, and every [run.<name>] entry against the
shape the host boundary calls. The result holds both errors and warnings;
an empty result means the program checks.
Modules are checked in dependency order, so a module’s imports are already resolved signatures by the time its own declarations are. ADR 0005 forbids import cycles, which is what makes such an order exist.