11.3 Syntax Object Bindings
Returns #t if the identifier a-id would bind
b-id (or vice-versa) if the identifiers were substituted in a
suitable expression context at the phase level indicated by
phase-level, #f otherwise. A #f value for
phase-level corresponds to the label phase level.
Returns #t if a-id and b-id access the same
local binding, module binding, or top-level
binding at the phase level indicated by
phase-level. A #f value for phase-level
corresponds to the label phase level.
“Same module binding” means that the identifiers refer to the same
original definition site, not necessarily the require or
provide site. Due to renaming in require and
provide, the identifiers may return distinct results with
Same as (free-identifier=? a-id b-id (add1 (syntax-local-phase-level))).
Same as (free-identifier=? a-id b-id (sub1 (syntax-local-phase-level))).
Same as (free-identifier=? a-id b-id #f).
Compares each identifier in ids with every other identifier
in the list with bound-identifier=?. If any comparison
returns #t, one of the duplicate identifiers is returned (the
first one in ids that is a duplicate), otherwise the result
Returns one of three kinds of values, depending on the binding of
id-stx at the phase level indicated by
phase-level (where a #f value for
phase-level corresponds to the label phase level):
The result is 'lexical if id-stx
has a local binding. If 'lexical is produced for
any phase-level value, then it is produced for all
The result is a list of seven items when id-stx
has a module binding: (list source-mod source-id nominal-source-mod nominal-source-id source-phase import-phase nominal-export-phase).
source-mod is a module path index (see
Compiled Modules and References) that indicates the defining module.
source-id is a symbol for the identifier’s name
at its definition site in the source module. This can be
different from the local name returned by
syntax->datum for several reasons: the identifier is
renamed on import, it is renamed on export, or it is
implicitly renamed because the identifier (or its import) was
generated by a macro invocation.
nominal-source-mod is a module path index (see
Compiled Modules and References) that indicates the module
required into the context of id-stx to
provide its binding. It can be different from
source-mod due to a re-export in
nominal-source-mod of some imported identifier. If
the same binding is imported in multiple ways, an arbitrary
representative is chosen.
nominal-source-id is a symbol for the
identifier’s name as exported by
nominal-source-mod. It can be different from
source-id due to a renaming provide, even if
source-mod and nominal-source-mod are the
source-phase is 1 if the source
definition is for-syntax, 0 otherwise.
import-phase is 0 if the binding
import of nominal-source-mode is a plain
require, 1 if it is from a
for-syntax import, etc.
nominal-export-phase is the phase level
of the export from nominal-source-mod.
The result is #f if id-stx has a
top-level binding (or, equivalently, if it is
Same as (identifier-binding id-stx (add1 (syntax-local-phase-level))).
Same as (identifier-binding id-stx (sub1 (syntax-local-phase-level))).
Same as (identifier-binding id-stx #f).