From 3a433f4ae4fb5e3a7d45fbc8797973e6769c0f25 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Mon, 3 Nov 2008 16:18:16 +0000 Subject: [PATCH] clarify that unbound = top-level binding in reference svn: r12226 --- collects/scribblings/reference/stx-comp.scrbl | 12 +++++++----- collects/scribblings/reference/syntax-model.scrbl | 15 ++++++++++----- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/collects/scribblings/reference/stx-comp.scrbl b/collects/scribblings/reference/stx-comp.scrbl index 8d2885d4e7..bdcacc0ba9 100644 --- a/collects/scribblings/reference/stx-comp.scrbl +++ b/collects/scribblings/reference/stx-comp.scrbl @@ -21,9 +21,10 @@ suitable expression context at the @tech{phase level} indicated by boolean?]{ Returns @scheme[#t] if @scheme[a-id] and @scheme[b-id] access the same -lexical, module, or top-level binding at the @tech{phase level} -indicated by @scheme[phase-level]. A @scheme[#f] value for -@scheme[phase-level] corresponds to the @tech{label phase level}. +@tech{local binding}, @tech{module binding}, or @tech{top-level +binding} at the @tech{phase level} indicated by +@scheme[phase-level]. A @scheme[#f] value for @scheme[phase-level] +corresponds to the @tech{label phase level}. ``Same module binding'' means that the identifiers refer to the same original definition site, not necessarily the @scheme[require] or @@ -127,8 +128,9 @@ Returns one of three kinds of values, depending on the binding of }} - @item{The result is @scheme[#f] if @scheme[id-stx] - has a @tech{top-level binding}.} + @item{The result is @scheme[#f] if @scheme[id-stx] has a + @tech{top-level binding} (or, equivalently, if it is + @tech{unbound}).} }} diff --git a/collects/scribblings/reference/syntax-model.scrbl b/collects/scribblings/reference/syntax-model.scrbl index 42c2557ad1..b2461f77a0 100644 --- a/collects/scribblings/reference/syntax-model.scrbl +++ b/collects/scribblings/reference/syntax-model.scrbl @@ -42,16 +42,13 @@ some are quoted to produce a symbol or a syntax object. An identifier @deftech{binds} another (i.e., it is a @deftech{binding}) when the former is parsed as a @tech{variable} and the latter is parsed as a reference to the former; the latter is -@deftech{bound}. The @deftech{scope} of a @tech{binding} is the set +@deftech{bound}. The @deftech{scope} of a @tech{binding} is the set of source forms to which it applies. The @deftech{environment} of a form is the set of bindings whose @tech{scope} includes the form. A binding for a sub-expression @deftech{shadows} any @tech{bindings} (i.e., it is @deftech{shadowing}) in its @tech{environment}, so that uses of an @tech{identifier} refer to the @tech{shadowing} -@tech{binding}. A @deftech{top-level binding} is a @tech{binding} -from a definition at the top-level; a @deftech{module binding} is a -binding from a definition in a module; and a @deftech{local binding} -is another other kind of binding. +@tech{binding}. For example, as a bit of source, the text @@ -63,6 +60,14 @@ appears twice). When this source is parsed in a typical @tech{variable} (unlike @scheme[let]). In particular, the first @scheme[x] @tech{binds} the second @scheme[x]. +A @deftech{top-level binding} is a @tech{binding} from a definition at +the top-level; a @deftech{module binding} is a binding from a +definition in a module; and a @deftech{local binding} is another other +kind of binding. There is no difference between an @deftech{unbound} +identifier and one with a @tech{top-level binding}; within a module, +references to @tech{top-level bindings} are disallowed, and so such +identifiers are called @tech{unbound} in a module context. + Throughout the documentation, @tech{identifiers} are typeset to suggest the way that they are parsed. A black, boldface @tech{identifier} like @scheme[lambda] indicates as a reference to a