reference: doc repairs

Doc corrections related to functions that have new optional arguments
in v7.0.

Closes #2134
This commit is contained in:
Matthew Flatt 2018-06-15 17:18:52 -06:00
parent 41fd4f3a5e
commit 047157dc30
5 changed files with 64 additions and 31 deletions

View File

@ -340,7 +340,8 @@ generated error message.
[message string?] [message string?]
[expr any/c #f] [expr any/c #f]
[sub-expr any/c #f] [sub-expr any/c #f]
[extra-sources (listof syntax?) null]) [extra-sources (listof syntax?) null]
[message-suffix string? ""])
any]{ any]{
Creates an @racket[exn:fail:syntax] value and @racket[raise]s it as an Creates an @racket[exn:fail:syntax] value and @racket[raise]s it as an
@ -391,7 +392,15 @@ through a combination of the @racket[name], @racket[expr], and
@item{When @racket[name] is a symbol, then the symbol @item{When @racket[name] is a symbol, then the symbol
is used as the form name in the generated error message.} is used as the form name in the generated error message.}
]} ]
The @racket[message-suffix] string is appended to the end of the error
message. If not @racket[""], it should normally start with a newline
and two spaces to add extra fields to the message (see
@secref["err-msg-conventions"]).
@history[#:changed "6.90.0.18" @elem{Added the @racket[message-suffix] optional argument.}]}
@deftogether[( @deftogether[(
@defproc[(unquoted-printing-string? [v any/c]) boolean?] @defproc[(unquoted-printing-string? [v any/c]) boolean?]

View File

@ -190,7 +190,8 @@ call. If no will is ready for immediate execution,
@racket[will-execute] blocks until one is ready.} @racket[will-execute] blocks until one is ready.}
@defproc[(will-try-execute [executor any/c]) any]{ @defproc[(will-try-execute [executor any/c] [v any/c #f])
any]{
Like @racket[will-execute] if a will is ready for immediate Like @racket[will-execute] if a will is ready for immediate
execution. Otherwise, @racket[v] is returned. execution. Otherwise, @racket[v] is returned.

View File

@ -273,7 +273,8 @@ Returns @racket[#t] if @racket[v] is a @tech{module path index},
@racket[#f] otherwise.} @racket[#f] otherwise.}
@defproc[(module-path-index-resolve [mpi module-path-index?]) @defproc[(module-path-index-resolve [mpi module-path-index?]
[load? any/c #f])
resolved-module-path?]{ resolved-module-path?]{
Returns a @tech{resolved module path} for the resolved module name, Returns a @tech{resolved module path} for the resolved module name,
@ -285,9 +286,12 @@ name resolver} (see @racket[current-module-name-resolver]). Depending
on the kind of module paths encapsulated by @racket[mpi], the computed on the kind of module paths encapsulated by @racket[mpi], the computed
resolved name can depend on the value of resolved name can depend on the value of
@racket[current-load-relative-directory] or @racket[current-load-relative-directory] or
@racket[current-directory]. @racket[current-directory]. The @racket[load?] argument is propagated as
the last argument to the @tech{module name resolver}.
See @racket[resolve-module-path-index].} See @racket[resolve-module-path-index].
@history[#:changed "6.90.0.16" @elem{Added the @racket[load?] optional argument.}]}
@defproc[(module-path-index-split [mpi module-path-index?]) @defproc[(module-path-index-split [mpi module-path-index?])

View File

@ -188,7 +188,7 @@ If @racket[as-constant?] is true, then the variable is made a constant
(so future assignments are rejected) after @racket[v] is installed as (so future assignments are rejected) after @racket[v] is installed as
the value. the value.
@history[#:changed "6.6.1" @elem{Added the @racket[as-constant?] argument.}]} @history[#:changed "6.90.0.14" @elem{Added the @racket[as-constant?] argument.}]}
@defproc[(namespace-undefine-variable! [sym symbol?] @defproc[(namespace-undefine-variable! [sym symbol?]
@ -210,11 +210,12 @@ corresponding to the @tech{namespace}'s @tech{base phase}.}
@defproc[(namespace-require [quoted-raw-require-spec any/c]) @defproc[(namespace-require [quoted-raw-require-spec any/c]
[namespace namespace? (current-namespace)])
void?]{ void?]{
Performs the import corresponding to @racket[quoted-raw-require-spec] Performs the import corresponding to @racket[quoted-raw-require-spec]
in the top-level environment of the current namespace, like a in the top-level environment of @racket[namespace], like a
top-level @racket[#%require]. The @racket[quoted-raw-require-spec] top-level @racket[#%require]. The @racket[quoted-raw-require-spec]
argument must be either a datum that corresponds to a quoted argument must be either a datum that corresponds to a quoted
@racket[_raw-require-spec] for @racket[#%require], which includes @racket[_raw-require-spec] for @racket[#%require], which includes
@ -223,38 +224,49 @@ module paths, or it can be a @tech{resolved module path}.
Module paths in @racket[quoted-raw-require-spec] are resolved with respect Module paths in @racket[quoted-raw-require-spec] are resolved with respect
to @racket[current-load-relative-directory] or to @racket[current-load-relative-directory] or
@racket[current-directory] (if the former is @racket[#f]), even if the @racket[current-directory] (if the former is @racket[#f]), even if the
current namespace corresponds to a module body.} current namespace corresponds to a module body.
@history[#:changed "6.90.0.16" @elem{Added the @racket[namespace] optional argument.}]}
@defproc[(namespace-require/copy [quoted-raw-require-spec any/c]) @defproc[(namespace-require/copy [quoted-raw-require-spec any/c]
[namespace namespace? (current-namespace)])
void?]{ void?]{
Like @racket[namespace-require] for syntax exported from the module, Like @racket[namespace-require] for syntax exported from the module,
but exported variables at the namespace's @tech{base phase} are but exported variables at the namespace's @tech{base phase} are
treated differently: the export's current value is copied to a treated differently: the export's current value is copied to a
top-level variable in the current namespace.} top-level variable in @racket[namespace].
@history[#:changed "6.90.0.16" @elem{Added the @racket[namespace] optional argument.}]}
@defproc[(namespace-require/constant [quoted-raw-require-spec any/c]) @defproc[(namespace-require/constant [quoted-raw-require-spec any/c]
[namespace namespace? (current-namespace)])
void?]{ void?]{
Like @racket[namespace-require], but for each exported variable at the Like @racket[namespace-require], but for each exported variable at the
@tech{namespace}'s @tech{base phase}, the export's value is copied to @tech{namespace}'s @tech{base phase}, the export's value is copied to
a corresponding top-level variable that is made immutable. Despite a corresponding top-level variable that is made immutable. Despite
setting the top-level variable, the corresponding identifier is bound setting the top-level variable, the corresponding identifier is bound
as imported.} as imported.
@history[#:changed "6.90.0.16" @elem{Added the @racket[namespace] optional argument.}]}
@defproc[(namespace-require/expansion-time [quoted-raw-require-spec any/c]) @defproc[(namespace-require/expansion-time [quoted-raw-require-spec any/c]
[namespace namespace? (current-namespace)])
void?]{ void?]{
Like @racket[namespace-require], but only the transformer part of the Like @racket[namespace-require], but only the transformer part of the
module is executed relative to the @tech{namespace}'s @tech{base module is executed relative to @racket[namespace]'s @tech{base
phase}; that is, the module is merely @tech{visit}ed, and not phase}; that is, the module is merely @tech{visit}ed, and not
@tech{instantiate}d (see @secref["mod-parse"]). If the required module @tech{instantiate}d (see @secref["mod-parse"]). If the required module
has not been instantiated before, the module's variables remain has not been instantiated before, the module's variables remain
undefined.} undefined.
@history[#:changed "6.90.0.16" @elem{Added the @racket[namespace] optional argument.}]}
@defproc[(namespace-attach-module [src-namespace namespace?] @defproc[(namespace-attach-module [src-namespace namespace?]
@ -356,16 +368,17 @@ is useful only for identification via @racket[eq?].}
@defproc[(module->namespace [mod (or/c module-path? @defproc[(module->namespace [mod (or/c module-path?
resolved-module-path? resolved-module-path?
module-path-index?)]) module-path-index?)]
[src-namespace namespace? (current-namespace)])
namespace?]{ namespace?]{
Returns a namespace that corresponds to the body of an instantiated Returns a namespace that corresponds to the body of an instantiated
module in the current namespace's @tech{module registry} and in the module in @racket[src-namespace]'s @tech{module registry} and in the
current namespace's @tech{base phase}, making the module @racket[src-namespace]'s @tech{base phase}, making the module
@tech{available} for on-demand @tech{visits} at the namespace's @tech{available} for on-demand @tech{visits} at @racket[src-namespace]'s
@tech{base phase}. The returned namespace has the same @tech{module @tech{base phase}. The returned namespace has the same @tech{module
registry} as the current namespace. Modifying a binding in the registry} as @racket[src-namespace]. Modifying a binding in the
namespace changes the binding seen in modules that require the resulting namespace changes the binding seen in modules that require the
namespace's module. namespace's module.
Module paths in a top-level @racket[require] expression are resolved Module paths in a top-level @racket[require] expression are resolved
@ -373,24 +386,30 @@ with respect to the namespace's module. New @racket[provide]
declarations are not allowed. declarations are not allowed.
If the current code inspector does not control the invocation of the If the current code inspector does not control the invocation of the
module in the current namespace's @tech{module registry}, the module in @racket[src-namespace]'s @tech{module registry}, the
@exnraise[exn:fail:contract]; see also @secref["modprotect"]. @exnraise[exn:fail:contract]; see also @secref["modprotect"].
Bindings in the namespace cannot be modified if the Bindings in the result namespace cannot be modified if the
@racket[compile-enforce-module-constants] parameter was true when the @racket[compile-enforce-module-constants] parameter was true when the
module was declared, unless the module declaration itself included module was declared, unless the module declaration itself included
assignments to the binding via @racket[set!].} assignments to the binding via @racket[set!].
@history[#:changed "6.90.0.16" @elem{Added the @racket[src-namespace] optional argument.}]}
@defproc[(namespace-syntax-introduce [stx syntax?]) syntax?]{ @defproc[(namespace-syntax-introduce [stx syntax?]
[namespace namespace? (current-namespace)])
syntax?]{
Returns a syntax object like @racket[stx], except that the current Returns a syntax object like @racket[stx], except that
namespace's bindings are included in the @tech{syntax object}'s @racket[namespace]'s bindings are included in the @tech{syntax object}'s
@tech{lexical information} (see @secref["stxobj-model"]). The @tech{lexical information} (see @secref["stxobj-model"]). The
additional context is overridden by any existing @tech{top-level additional context is overridden by any existing @tech{top-level
bindings} in the @tech{syntax object}'s @tech{lexical information}, or bindings} in the @tech{syntax object}'s @tech{lexical information}, or
by any existing or future @tech{module bindings} in the @tech{lexical by any existing or future @tech{module bindings} in the @tech{lexical
information}.} information}.
@history[#:changed "6.90.0.16" @elem{Added the @racket[namespace] optional argument.}]}
@defproc[(module-provide-protected? [module-path-index (or/c symbol? module-path-index?)] @defproc[(module-provide-protected? [module-path-index (or/c symbol? module-path-index?)]

View File

@ -368,7 +368,7 @@ expansion history to external tools.
#:changed "7.0.0.1" @elem{Added the @racket[#:extend-stop-ids?] argument.}]} #:changed "7.0.0.1" @elem{Added the @racket[#:extend-stop-ids?] argument.}]}
@defproc[(syntax-local-expand-expression [stx any/c] [opaque-only? #f]) @defproc[(syntax-local-expand-expression [stx any/c] [opaque-only? any/c #f])
(values (if opaque-only? #f syntax?) syntax?)]{ (values (if opaque-only? #f syntax?) syntax?)]{
Like @racket[local-expand] given @racket['expression] and an empty Like @racket[local-expand] given @racket['expression] and an empty