Skip to main content

check_module

Function check_module 

Source
pub fn check_module(
    module: &ModulePath,
    modules: &ModuleSet,
    types: &TypeRegistry,
    lookup: &OpLookup,
) -> Vec<ModuleDiagnostic>
Expand description

Projects runtime registrations and checks all supplied definitions without callbacks.

Projection failures are explicit diagnostics. Match-key comparisons and whole-graph solvability remain runtime checks.

ยงExamples

let mut modules = adam_lang::ModuleSet::new();
let path = "app".parse().unwrap();
modules.insert_source(path, "app.adm2", "sheet app {}").unwrap();
assert!(adam_lang::check_module(&"app".parse().unwrap(), &modules,
    &adam_lang::TypeRegistry::new(), &cel_parser::OpLookup::new()).is_empty());