pub struct TypeChecker { /* private fields */ }Implementations§
Source§impl TypeChecker
impl TypeChecker
pub fn new() -> Self
Sourcepub fn get_union(&self, name: &str) -> Option<&UnionTypeInfo>
pub fn get_union(&self, name: &str) -> Option<&UnionTypeInfo>
Look up a union type by name
Sourcepub fn get_unions(&self) -> &HashMap<String, UnionTypeInfo>
pub fn get_unions(&self) -> &HashMap<String, UnionTypeInfo>
Get all registered union types
Sourcepub fn register_external_words(&mut self, words: &[(&str, Option<&Effect>)])
pub fn register_external_words(&mut self, words: &[(&str, Option<&Effect>)])
Register external word effects (e.g., from included modules).
Words with Some(effect) get their actual signature.
Words with None get a maximally polymorphic placeholder ( ..a -- ..b ).
Sourcepub fn register_external_unions(&mut self, union_names: &[&str])
pub fn register_external_unions(&mut self, union_names: &[&str])
Register external union type names (e.g., from included modules).
This allows field types in union definitions to reference types from includes. We only register the name as a valid type; we don’t need full variant info since the actual union definition lives in the included file.
Sourcepub fn take_quotation_types(&self) -> HashMap<usize, Type>
pub fn take_quotation_types(&self) -> HashMap<usize, Type>
Extract the type map (quotation ID -> inferred type)
This should be called after check_program() to get the inferred types for all quotations in the program. The map is used by codegen to generate appropriate code for Quotations vs Closures.