Skip to main content

Module env

Module env 

Source
Expand description

Type environment: type-decl info and value-binding scopes.

Structs§

TypeDef
TypeEnv

Enums§

TypeDefKind

Functions§

ty_from_canon
Convert canonical TypeExpr to internal Ty, treating type params as fresh-numbered Vars (0..n in declaration order). When instantiating, we substitute these out.
ty_from_canon_env
Like ty_from_canon but resolves RecordWithSpreads by looking up base type names in env. Called from add_user_type and function_scheme so that { ...Post, extra :: Int } expands to a flat Ty::Record.