Skip to main content

Module declaration

Module declaration 

Source
Expand description

Type surface of submilli:session.

get is declared generic in T but must never reach the ordinary generic-call lowering: that sets return_cast, which codegen emits as a Wasm representation cast rather than a structural check, so wrong-shaped stored data would arrive statically typed and never validated. The typechecker intercepts this symbol by mangled name and rewrites the call into a checked Cast instead — see infer_generic_call. The declaration and that interception are a matched pair; neither is sound alone.

Functions§

is_checked_get
Whether mangled is this package’s checked read. Matching the package-export mangled name rather than a receiver name is what makes the typechecker’s rewrite independent of how the symbol was imported — session.get, kv.get under an aliased namespace import, and a named-import get all carry this name, while a user’s own session binding never can.
package_declaration