Skip to main content

Module mangle

Module mangle 

Source
Expand description

Fully-qualified symbol naming: <package>#<symbol> for public/top-level package symbols. Internal module symbols use a separate mod: namespace so they cannot collide with package-public names. Treat MangledName as opaque; use the constructors rather than depending on the textual format.

Structs§

MangledName
Opaque newtype; construct via the module builders to keep the format centralised.

Constants§

PRELUDE_PACKAGE
SEP
USER_PACKAGE

Functions§

closure_cache
Export key of the global that caches a function’s closure, shared by every module that reads the function as a value. The angle brackets keep it apart from any source identifier.
extend
host
is_builtin
Whether a symbol is declared by Submilli itself (the prelude or a submilli: standard-library module) rather than by a program or package.
package_module_symbol
Internal module symbol for a declaration in a multi-file package. module is the canonicalized package-relative path (util, internal/math) — no leading ./, no .subm suffix. Root-exported (public) symbols use package_symbol instead.
package_symbol
Canonical public package symbol.
prelude
static_member
Dispatch key for a static class member: Class#static#name. The extra static segment keeps statics disjoint from instance-method export keys (Class#name) — a static and an instance method may share a name.