On this page:
#%variable-reference

3.6 Locations: #%variable-reference

Produces an opaque variable reference value representing the location of id, which must be bound as a variable. If no id is supplied, the resulting value refers to an “anonymous” variable defined within the enclosing context (i.e., within the enclosing module, or at the top level if the form is not inside a module).

When (#%top . id) is used, then the variable reference refers to the same variable as (#%top . id). Note that (#%top . id) is not allowed if id is locally bound or within a module if id is bound as a transformer.

A variable reference can be used with variable-reference->empty-namespace, variable-reference->resolved-module-path, and variable-reference->namespace, but facilities like define-namespace-anchor and namespace-anchor->namespace wrap those to provide a clearer interface. A variable reference is also useful to low-level extensions; see Inside: Racket C API.

Changed in version 8.2.0.7 of package base: Changed #%top treatment to be consistent with #%top by itself.