3.5 Variable References and #%top
When the expander encounters an id that is not bound by a module-level or local binding, it converts the expression to (#%top . id) giving #%top the lexical context of the id; typically, that context refers to #%top. See also Expansion Steps.
(#%top . id)
Within a module form, (#%top . id) expands to just id as long as id is defined within the module and has no local binding in its context. At phase level 0, (#%top . id) is an immediate syntax error if id is not bound. At phase level 1 and higher, a syntax error is reported if id is not defined at the corresponding phase by the end of module-body partial expansion.
See also Expansion Steps for information on how the expander introduces #%top identifiers.
Changed in version 6.3 of package base: Changed the introduction of
#%top in a top-level context
to unbound identifiers only.
Changed in version 126.96.36.199: Changed treatment of locally bound id to always report a syntax error, even outside of a module.