Skip to main content

Module declaration

Module declaration 

Source
Expand description

Type surface of submilli:session.

get is declared generic in T and runtime-generic: like every generic function, a call passes one $TypeDescriptor per type parameter in a trailing $types environment, carrying the type’s structural predicate (codegen::runtime_descriptors). The host tests the stored value against it and throws a catchable TypeError on a mismatch, so wrong-shaped stored data never arrives statically typed. The typechecker gates what T may be (session_get_gate, matched by mangled name through is_checked_get); the declaration and that gate are a matched pair.

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 gate 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