pub fn check_module( decls: &[Decl], linked: Option<Rc<Env>>, hooks: Option<&CheckHooks>, ) -> Vec<Diag>