Skip to main content

Module infer

Module infer 

Source
Expand description

Expression-level static analysis — a port of the reference implementation’s infer.ts: type inference, assignability (§3.18, strict S ⊑ T), the absence discipline (§4.10) with its two narrowing rules, and the match static checks (§4.7). Inference is conservative: a form whose type cannot be determined yields unknown (rt None) and suppresses downstream judgments rather than guessing.

Structs§

Ctx
Guards
Target
what a name denotes: the declaration behind it, imports followed to their module
Ty

Enums§

StdRet
the return type of a std function, by shape

Constants§

STD
the std functions (§13.1: names not listed do not exist): name, arity, return

Functions§

apply_guards
check_expr
guards_of
has_null
infer
js_str
js_typeof
make_ctx
member_ty
mk_union
named
num_kind
path_key
prim
require_val
resolve_in
resolve_name
std_names
the std function names, in table order (completion)
std_path
tag
try_resolve
type_text
tyv
unk

Type Aliases§

Report