diff --git a/collects/scribblings/reference/stx-trans.scrbl b/collects/scribblings/reference/stx-trans.scrbl index 1e4b26fa85..d747a6898d 100644 --- a/collects/scribblings/reference/stx-trans.scrbl +++ b/collects/scribblings/reference/stx-trans.scrbl @@ -178,7 +178,9 @@ literal data expressions without the respective explicit form are not wrapped with the explicit form. If @scheme[stop-ids] is @scheme[#f] instead of a list, then @scheme[stx] is expanded only as long as the outermost form of @scheme[stx] is a macro (i.e., expansion does not -proceed to sub-expressions). +proceed to sub-expressions). A fully expanded form can include the +bindings listed in @secref["fully-expanded"] plus the +@scheme[letrec-syntaxes+values] form. The optional @scheme[intdef-ctx] argument must be either @scheme[#f], the result of @scheme[syntax-local-make-definition-context], or a list diff --git a/collects/scribblings/reference/syntax-model.scrbl b/collects/scribblings/reference/syntax-model.scrbl index 457639a2c8..e67078a38f 100644 --- a/collects/scribblings/reference/syntax-model.scrbl +++ b/collects/scribblings/reference/syntax-model.scrbl @@ -252,6 +252,10 @@ in which case the relevant @tech{phase level} is 1 (for which comparisons are made using @scheme[free-transformer-identifier=?] instead of @scheme[free-identifier=?]). +In addition to the grammar above, @scheme[letrec-syntaxes+values] can +appear in a fully local-expanded expression, such as the result from +@scheme[local-expand] when the stop list is empty. + @;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @subsection[#:tag "expand-steps"]{Expansion Steps} diff --git a/collects/scribblings/reference/syntax.scrbl b/collects/scribblings/reference/syntax.scrbl index e1fd2b586e..5a6ff2d477 100644 --- a/collects/scribblings/reference/syntax.scrbl +++ b/collects/scribblings/reference/syntax.scrbl @@ -1577,6 +1577,14 @@ Combines @scheme[letrec-syntaxes] with @scheme[letrec-values]: each @scheme[trans-id] and @scheme[val-id] is bound in all @scheme[trans-expr]s and @scheme[val-expr]s. +The @scheme[letrec-syntaxes+values] form is the core form for local +compile-time bindings, since forms like @scheme[letrec-syntax] and +internal @scheme[define-syntax] expand to it. In a fully expanded +expression (see @secref["fully-expanded"]), the @scheme[trans-id] +bindings are discarded and the form reduces to @scheme[letrec], but +@scheme[letrec-syntaxes+values] can appear in the result of +@scheme[local-expand] with an empty stop list. + See also @scheme[local], which supports local bindings with @scheme[define], @scheme[define-syntax], and more.} diff --git a/collects/syntax/kerncase.ss b/collects/syntax/kerncase.ss index 177f650527..612c595e62 100644 --- a/collects/syntax/kerncase.ss +++ b/collects/syntax/kerncase.ss @@ -91,8 +91,9 @@ #%expression #%plain-app #%top - #%datum ; should this be here? - #%variable-reference)))) + #%datum + #%variable-reference + module #%provide #%require)))) (provide kernel-syntax-case kernel-syntax-case* diff --git a/collects/syntax/scribblings/kerncase.scrbl b/collects/syntax/scribblings/kerncase.scrbl index df4204cf96..196ac1a067 100644 --- a/collects/syntax/scribblings/kerncase.scrbl +++ b/collects/syntax/scribblings/kerncase.scrbl @@ -57,7 +57,13 @@ level, as indicated by @scheme[phase-expr].} Returns a list of identifiers that are bound normally, @scheme[for-syntax], and @scheme[for-template] to the primitive PLT -Scheme forms for expressions and internal-definition positions (so the -list does not include @scheme[#%require] or @scheme[#%provide]). This -function is useful for generating a list of stopping points to provide -to @scheme[local-expand].} +Scheme forms for expressions, internal-definition positions, and +module-level and top-level positions. This function is useful for +generating a list of stopping points to provide to +@scheme[local-expand]. + +In addition to the identifiers listed in @secref[#:doc '(lib +"scribblings/reference/reference.scrbl") "fully-expanded"], the list +includes @scheme[letrec-syntaxes+values], which is the core form for +local expand-time binding and can appear in the result of +@scheme[local-expand].} diff --git a/doc/release-notes/mzscheme/HISTORY.txt b/doc/release-notes/mzscheme/HISTORY.txt index a7bb6393e6..7c56db5de7 100644 --- a/doc/release-notes/mzscheme/HISTORY.txt +++ b/doc/release-notes/mzscheme/HISTORY.txt @@ -1,3 +1,6 @@ +Version 4.2.1.6 +Added print-syntax-width + Version 4.2.1.5 Added file-or-directory-identity