glisp / infer
infer
Functions
infer()
infer(
ast,env):TypeValue|null
Defined in: infer.ts:44
Statically infer the TypeValue of ast against env without evaluating it. Returns null when the inferred type cannot be determined (for example, a free variable, or an expression whose head is not a function-typed value).
Used by check.ts to surface type-mismatch diagnostics without running the program, and by the evaluator’s typed-host-fn path to skip evaluating arguments that already statically mismatch their declared parameter type.
Parameters
| Parameter | Type |
|---|---|
ast | AST |
env | Env |
Returns
TypeValue | null