Skip to main content

Module check

Module check 

Source
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) → codegen

Functions§

check_program
Check a LOGOS program and return a typed TypeEnv for codegen.