Skip to main content

check_facts

Function check_facts 

Source
pub fn check_facts(
    package: &Package,
    program: &Program,
    schemas: &HostSchemas,
) -> (Vec<Diagnostic>, Facts)
Expand description

Type-checks a resolved program against schemas, keeping what the check worked out about each expression.

This is check_with with its second answer. The check is the same one — the facts are written as the walk settles them and read by nothing during it — so a caller that wants only the diagnostics loses nothing by taking this instead, and one that wants the types does not have to derive them a second time. Facts says why deriving them a second time is the thing worth avoiding.