Expand description
Bidirectional type checker for the LOGOS compilation pipeline.
Replaces TypeEnv::infer_program() with a proper constraint-solving pass
that eliminates Unknown for field access, empty collections, option literals,
pipe receives, inspect arm bindings, and closure call expressions.
§Architecture
AST
│
├── preregister_functions ← forward-reference pre-pass
│
└── infer_stmt / infer_expr ← bidirectional checking
│
└── UnificationTable ← Robinson unification (from unify.rs)
│
└── zonk → TypeEnv (LogosType) → codegenStructs§
- Indexed
Type Error - Check a LOGOS program and return a typed
TypeEnvfor codegen.
Functions§
- check_
program - genuine type contradictions (e.g.,
Let x: Int be "hello"). Ambiguous types fall back toLogosType::Unknownsilently. - check_
program_ collect - Collect EVERY failing top-level statement instead of bailing at the first.