reflect
The database’s own declarations, such as its roles, properties, and Flows, as read-only roles to query.
Properties inherit visibility from their roles; user aliases do not confer provider authority.
Write these names after reflect::, as in reflect::DeclarationKind.
DeclarationKind
set enum DeclarationKind = {Def, Let, Val, Var, Proc, Set, Bnd, QSet, Qnt, Rep, Lex, Lexer, QLex, Reg, Peg, Parser, Mod, Role, Prop, Namespace}The source declaration form, independent of aliases and overlapping role membership.
DeclarationModifier
set enum DeclarationModifier = {Enum, Lin, Rec}Authored declaration modifiers; visibility and attributes are not modifiers.
DeclarationOrigin
set enum DeclarationOrigin = {User, Standard}Declaration ownership: user catalog or edition-owned standard library, never the alias target’s origin.
Declaration
role DeclarationInstalled roots and source-owned declarations, including private declarations and aliases.
Module
role ModuleActual root, inline, and derived Modules. Each shares its Declaration ref and UUID. Module aliases are declarations but are not members of this role.
Declaration::name
prop Declaration::name! strDecoded local name, excluding namespace and property-owner prefixes. Roots use their canonical registry key or standard specifier; names need not be unique.
Declaration::qualified_name
prop Declaration::qualified_name! strCanonical escaped name relative to the owning Module, including namespace and property qualification. Roots use their canonical key; aliases use their own destination name. Names need not be unique.
Declaration::kind
prop Declaration::kind! DeclarationKindThe exact source declaration kind, or an alias’s selected kind. Roots have kind Mod.
Namespace includes namespace aliases; Mod includes owned and aliased Modules.
Let has no live entries because only live-admissible declarations are reflected.
Declaration::is_alias
prop Declaration::is_alias! boolTrue exactly for use entries; false for roots. Aliases describe their own entries without expanding targets.
Declaration::origin
prop Declaration::origin! DeclarationOriginOwnership provenance; a user alias to a standard declaration still has origin User.
This is not an editability or write-authority flag.
Declaration::modifier
prop Declaration::modifier* DeclarationModifierOne member per applicable authored enum or lin modifier.
Roots and aliases have no modifier occurrences; other unmodified declarations also have an empty Bag.
Declaration::parent
prop Declaration::parent? DeclarationImmediate containment: the role of a property or declared member, an entry’s namespace, or its containing Module. Roots have no parent; every non-root entry has exactly one. Alias targets never supply parenthood; a parent is never an alias.
Declaration::module
prop Declaration::module? Declaration & ModuleOwning source Module for each non-root entry, including inline/derived Modules and aliases.
Roots have no owner. Unlike parent, this skips namespaces and owning roles.