scribble fixes -- nested @scheme and a few other similar problems
svn: r10744
This commit is contained in:
parent
e180452d8f
commit
4cd2614c21
|
@ -123,7 +123,7 @@ functions to be called through @scheme[c-lambda].
|
|||
|
||||
The @scheme[c-include] form expands to a @scheme[c-declare] form using
|
||||
the content of a specified file. Use @scheme[(c-include _file)] instead
|
||||
of @scheme[(c-declare "#include @scheme[_file]")] when it's easier to
|
||||
of @scheme[(c-declare "#include file")] when it's easier to
|
||||
have MzScheme resolve the file path than to have the C compiler
|
||||
resolve it.
|
||||
|
||||
|
|
|
@ -455,8 +455,8 @@ the right choice when using @scheme[lexer] in other situations.
|
|||
|
||||
|
||||
Like @scheme[define-tokens], except a each token constructor
|
||||
@schemeidfont{token-}@scheme[token-id] take nos arguments and returns
|
||||
@scheme[(@scheme[quote] token-id)].}
|
||||
@schemeidfont{token-}@scheme[token-id] takes no arguments and returns
|
||||
@scheme[(#, @scheme[quote] token-id)].}
|
||||
|
||||
|
||||
@defproc[(token-name [t (or/c token? symbol?)]) symbol?]{
|
||||
|
|
|
@ -541,7 +541,7 @@
|
|||
|
||||
|
||||
|
||||
Calls @scheme[(make-object @method[frame:editor<%> get-editor%])].
|
||||
Calls @scheme[(make-object #, @method[frame:editor<%> get-editor%])].
|
||||
|
||||
}
|
||||
@defmethod*[(((revert) void))]{
|
||||
|
@ -794,7 +794,7 @@
|
|||
}
|
||||
@defmethod*[#:mode override (((get-editor<%>) interface))]{
|
||||
|
||||
Returns @scheme[(class->interface @scheme[text%])].
|
||||
Returns @scheme[(class->interface text%)].
|
||||
}
|
||||
}
|
||||
@definterface[frame:pasteboard<%> (frame:editor<%>)]{
|
||||
|
@ -812,7 +812,7 @@
|
|||
}
|
||||
@defmethod*[#:mode override (((get-editor<%>) interface))]{
|
||||
|
||||
Returns @scheme[(class->interface @scheme[pasteboard%])].
|
||||
Returns @scheme[(class->interface pasteboard%)].
|
||||
}
|
||||
}
|
||||
@definterface[frame:delegate<%> (frame:status-line<%> frame:text<%>)]{
|
||||
|
|
|
@ -551,7 +551,7 @@ The @scheme[x] and @scheme[y] arguments are the snip's
|
|||
@scheme[editorx] and @scheme[editory] arguments are the snip's
|
||||
@techlink{location} in editor coordinates. To get @scheme[event]'s x
|
||||
@techlink{location} in snip coordinates, subtract @scheme[x] from
|
||||
@scheme[(send @scheme[event] get-x)].
|
||||
@scheme[(send event get-x)].
|
||||
|
||||
See also @indexed-scheme['handles-events] in @method[snip% get-flags].
|
||||
|
||||
|
@ -581,7 +581,7 @@ The @scheme[x] and @scheme[y] arguments are the snip's
|
|||
@scheme[editorx] and @scheme[editory] arguments are the snip's
|
||||
@techlink{location} in editor coordinates. To get @scheme[event]'s x
|
||||
@techlink{location} in snip coordinates, subtract @scheme[x] from
|
||||
@scheme[(send @scheme[event] get-x)].
|
||||
@scheme[(send event get-x)].
|
||||
|
||||
See also @indexed-scheme['handles-events] in @method[snip% get-flags].
|
||||
|
||||
|
|
|
@ -103,13 +103,13 @@ For a text field, the most useful methods of a @scheme[text%] object
|
|||
are the following:
|
||||
@itemize{
|
||||
|
||||
@item{@scheme[(send a-text @method[text% get-text])] returns
|
||||
@item{@scheme[(send a-text #, @method[text% get-text])] returns
|
||||
the current text of the editor.}
|
||||
|
||||
@item{@scheme[(send a-text @method[text% erase])] deletes all text from
|
||||
@item{@scheme[(send a-text #, @method[text% erase])] deletes all text from
|
||||
the editor.}
|
||||
|
||||
@item{@scheme[(send a-text @method[text% insert] _str)] inserts
|
||||
@item{@scheme[(send a-text #, @method[text% insert] _str)] inserts
|
||||
@scheme[_str] into the editor at the current caret position.}
|
||||
|
||||
}
|
||||
|
|
|
@ -70,7 +70,7 @@ Creates symbols and abbreviates nested lists.
|
|||
|
||||
Normally, this form is written with a @litchar{'}, like
|
||||
@scheme['(apple banana)], but it can also be written with @scheme[quote], like
|
||||
@scheme[((unsyntax @scheme[quote]) (apple banana))].}
|
||||
@scheme[(#, @scheme[quote] (apple banana))].}
|
||||
|
||||
@; ----------------------------------------
|
||||
|
||||
|
@ -86,8 +86,8 @@ to expression ``unquotes.''
|
|||
|
||||
Normally, this form is written with a backquote, @litchar{`}, like
|
||||
@scheme[`(apple ,(+ 1 2))], but it can also be written with
|
||||
@scheme[quasiquote], like @scheme[((unsyntax @scheme[quasiquote])
|
||||
(apple ,(+ 1 2)))].}
|
||||
@scheme[quasiquote], like
|
||||
@scheme[(#, @scheme[quasiquote] (apple ,(+ 1 2)))].}
|
||||
|
||||
|
||||
@deftogether[(
|
||||
|
|
|
@ -276,7 +276,7 @@ A quoted @scheme[id] is a symbol. A symbol is a constant, like
|
|||
|
||||
Normally, a symbol is written with a @litchar{'}, like
|
||||
@scheme['apple], but it can also be written with @scheme[quote], like
|
||||
@scheme[((unsyntax @scheme[quote]) apple)].
|
||||
@scheme[(#, @scheme[quote] apple)].
|
||||
|
||||
The @scheme[id] for a symbol is a sequence of characters not including
|
||||
a space or one of the following:}
|
||||
|
|
|
@ -125,7 +125,7 @@ are provided to the embedding executable. A command-line argument that
|
|||
evaluates an expression or loads a file will be executed after the
|
||||
embedded code is loaded.
|
||||
|
||||
Each element of the @scheme[@:modules] argument @scheme[mod-list] is a
|
||||
Each element of the @scheme[#:modules] argument @scheme[mod-list] is a
|
||||
two-item list, where the first item is a prefix for the module name,
|
||||
and the second item is a module path datum (that's in the format
|
||||
understood by the default module name resolver). The prefix can be a
|
||||
|
|
|
@ -153,7 +153,7 @@ string.
|
|||
|
||||
@defproc[(bytes->list [bstr bytes?]) (listof byte?)]{ Returns a new
|
||||
list of bytes coresponding to the content of @scheme[bstr]. That is,
|
||||
the length of the list is @scheme[(bytes-length @scheme[bstr])], and the
|
||||
the length of the list is @scheme[(bytes-length bstr)], and the
|
||||
sequence of bytes of @scheme[bstr] are in the same sequence in the
|
||||
result list.
|
||||
|
||||
|
@ -162,7 +162,7 @@ string.
|
|||
|
||||
@defproc[(list->bytes [lst (listof byte?)]) bytes?]{ Returns a new
|
||||
mutable bytes whose content is the list of bytes in @scheme[lst].
|
||||
That is, the length of the bytes is @scheme[(length @scheme[lst])], and
|
||||
That is, the length of the bytes is @scheme[(length lst)], and
|
||||
the sequence of bytes in @scheme[lst] is in the same sequence in
|
||||
the result bytes.
|
||||
|
||||
|
|
|
@ -1472,7 +1472,7 @@ the @scheme[interface-expr]s, and the @scheme[class-clause]s are as in
|
|||
|
||||
This forms can only be used at the top level, either within a module
|
||||
or outside. The @scheme[class-id] identifier is bound to the new
|
||||
class, and @scheme[deserialize-info:@scheme[class-id]] is also
|
||||
class, and @scheme[deserialize-info:]@scheme[class-id] is also
|
||||
defined; if the definition is within a module, then the latter is
|
||||
provided from the module.
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ The list of continuation marks for a key @scheme[_k] and a continuation
|
|||
@scheme[null].}
|
||||
|
||||
@item{If @scheme[_C]'s first frame contains a mark @scheme[_m] for @scheme[_k],
|
||||
then the mark list for @scheme[_C] is @scheme[(cons @scheme[_m] _lst)],
|
||||
then the mark list for @scheme[_C] is @scheme[(cons _m _lst)],
|
||||
where @scheme[_lst] is the mark list for @scheme[_k] in @cont[0].}
|
||||
|
||||
@item{If @scheme[_C]'s first frame does not contain a mark keyed by
|
||||
|
|
|
@ -15,17 +15,21 @@
|
|||
|
||||
@(define hole (make-element #f (list "[]")))
|
||||
@(define (*sub c e) (make-element #f (list c "[" e "]")))
|
||||
@(define langle (make-element 'tt (list "<")))
|
||||
@(define rangle (make-element 'tt (list ">")))
|
||||
@(define comma (make-element 'tt (list ", ")))
|
||||
@(define-syntax sub
|
||||
(syntax-rules () [(_ a b) (*sub (scheme a) (scheme b))]))
|
||||
@(define (*state c e) (make-element #f (list langle c comma e rangle)))
|
||||
@(define-syntax state
|
||||
(syntax-rules () [(_ a b) (*state (scheme a) (scheme b))]))
|
||||
@(define (frame n)
|
||||
(make-element "schemevariable"
|
||||
(list "C" (make-element 'subscript (list (format "~a" n))))))
|
||||
@;{
|
||||
These are not used; if they do get back in, then it's probably better
|
||||
to switch to the usual langle/rangle that is used in syntax definitions.
|
||||
@(define langle (make-element 'tt (list "<")))
|
||||
@(define rangle (make-element 'tt (list ">")))
|
||||
@(define comma (make-element 'tt (list ", ")))
|
||||
@(define (*state c e) (make-element #f (list langle c comma e rangle)))
|
||||
@(define-syntax state
|
||||
(syntax-rules () [(_ a b) (*state (scheme a) (scheme b))]))
|
||||
;}
|
||||
|
||||
@;------------------------------------------------------------------------
|
||||
@title[#:tag "eval-model"]{Evaluation Model}
|
||||
|
@ -59,7 +63,7 @@ Some simplifications require more than one step. For example:
|
|||
|
||||
An expression that is not a @tech{value} can always be partitioned
|
||||
into two parts: a @deftech{redex}, which is the part that changed in a
|
||||
single-step simplification (show in blue), and the
|
||||
single-step simplification (highlighted), and the
|
||||
@deftech{continuation}, which is the surrounding expression
|
||||
context. In @scheme[(- 4 (+ 1 1))], the redex is @scheme[(+ 1 1)], and
|
||||
the continuation is @scheme[(- 4 #, @hole)], where @hole takes the
|
||||
|
|
|
@ -203,7 +203,7 @@ otherwise.}
|
|||
|
||||
@defproc*[([(- [z number?]) number?]
|
||||
[(- [z number?] [w number?] ...+) number?])]{
|
||||
When no @scheme[w]s are supplied, returns @scheme[(- 0 #, @scheme[z])].
|
||||
When no @scheme[w]s are supplied, returns @scheme[(- 0 z)].
|
||||
Otherwise, returns the subtraction of the @scheme[w]s from @scheme[z]
|
||||
working pairwise from left to right.}
|
||||
|
||||
|
@ -219,7 +219,7 @@ otherwise.}
|
|||
|
||||
@defproc*[([(/ [z number?]) number?]
|
||||
[(/ [z number?] [w number?] ...+) number?])]{
|
||||
When no @scheme[w]s are supplied, returns @scheme[(/ 1 #, @scheme[z])].
|
||||
When no @scheme[w]s are supplied, returns @scheme[(/ 1 z)].
|
||||
Otherwise, returns the division @scheme[z] by the var[w]s
|
||||
working pairwise from left to right.}
|
||||
|
||||
|
@ -576,8 +576,8 @@ produces @scheme[+nan.0] in the case that neither @scheme[y] nor
|
|||
(semi-infinite) two's complement representation. If @scheme[m] is
|
||||
non-negative, the integer @scheme[n] is shifted left by @scheme[m] bits;
|
||||
i.e., @scheme[m] new zeros are introduced as rightmost digits. If
|
||||
@scheme[m] is negative, @scheme[n] is shifted right by @scheme[(- #,
|
||||
@scheme[m])] bits; i.e., the rightmost @scheme[m] digits are dropped.
|
||||
@scheme[m] is negative, @scheme[n] is shifted right by @scheme[(- m)]
|
||||
bits; i.e., the rightmost @scheme[m] digits are dropped.
|
||||
|
||||
@examples[(arithmetic-shift 1 10) (arithmetic-shift 255 -3)]}
|
||||
|
||||
|
|
|
@ -145,7 +145,7 @@ contains the concatenated characters of the given @scheme[str]s. If no
|
|||
|
||||
@defproc[(string->list [str string?]) (listof char?)]{ Returns a new
|
||||
list of characters coresponding to the content of @scheme[str]. That is,
|
||||
the length of the list is @scheme[(string-length @scheme[str])], and the
|
||||
the length of the list is @scheme[(string-length str)], and the
|
||||
sequence of characters of @scheme[str] are in the same sequence in the
|
||||
result list.
|
||||
|
||||
|
@ -154,7 +154,7 @@ contains the concatenated characters of the given @scheme[str]s. If no
|
|||
|
||||
@defproc[(list->string [lst (listof char?)]) string?]{ Returns a new
|
||||
mutable string whose content is the list of characters in @scheme[lst].
|
||||
That is, the length of the string is @scheme[(length @scheme[lst])], and
|
||||
That is, the length of the string is @scheme[(length lst)], and
|
||||
the sequence of characters in @scheme[lst] is in the same sequence in
|
||||
the result string.
|
||||
|
||||
|
|
|
@ -88,10 +88,10 @@ for the module whose source contains @scheme[stx], or @scheme[#f] if
|
|||
|
||||
Unwraps the immediate datum structure from a @tech{syntax object},
|
||||
leaving nested syntax structure (if any) in place. The result of
|
||||
@scheme[(syntax-e @scheme[stx])] is one of the following:
|
||||
@scheme[(syntax-e stx)] is one of the following:
|
||||
|
||||
@itemize{
|
||||
|
||||
|
||||
@item{a symbol}
|
||||
|
||||
@item{a @tech{syntax pair} (described below)}
|
||||
|
|
|
@ -386,9 +386,9 @@ its lexical information, and if the current expansion context is not a
|
|||
@tech{module context}.
|
||||
|
||||
If a binding of @scheme[inner-identifier] shadows @scheme[id-stx], the
|
||||
result is the same as @scheme[(syntax-local-get-shadower
|
||||
@scheme[inner-identifier])], except that it has the location and
|
||||
properties of @scheme[id-stx].
|
||||
result is the same as
|
||||
@scheme[(syntax-local-get-shadower inner-identifier)], except that it
|
||||
has the location and properties of @scheme[id-stx].
|
||||
|
||||
Otherwise, the result is the same as @scheme[id-stx] with its module
|
||||
bindings (if any) removed from its lexical information, and the
|
||||
|
|
|
@ -27,7 +27,7 @@ Prefer ``function'' to ``procedure.''
|
|||
Avoid cut-and-paste for descriptive text. If two functions are
|
||||
similar, consider documenting them together with
|
||||
@scheme[deftogether]. To abstract a description, consider using
|
||||
explicit prose abstraction, such as ``@scheme[x] is like @scheme[@y],
|
||||
explicit prose abstraction, such as ``@scheme[x] is like @scheme[y],
|
||||
except that ...,'' instead of abstracting the source and instantiating
|
||||
it multiple times; often, a prose abstraction is clearer to the reader
|
||||
than a hidden abstraction in the document implementation.
|
||||
|
|
|
@ -91,7 +91,7 @@ The following functions allow programs to react to events from the canvas.
|
|||
|
||||
@defproc[(on-key-event [change (-> (unsyntax @tech{DrawKeyEvent}) (unsyntax @tech{DrawWorld}) (unsyntax @tech{DrawWorld}))])
|
||||
true]{Adds @scheme[change] to the world. The function reacts to keyboard
|
||||
events and creates a new @scheme[(unsyntax @tech{DrawWorld})].}
|
||||
events and creates a new @scheme[#, @tech{DrawWorld}].}
|
||||
|
||||
@defproc[(on-tick-event [tock (-> (unsyntax @tech{DrawWorld}) (unsyntax @tech{DrawWorld}))]) true]{Adds @scheme[tock]
|
||||
to the world. The function reacts to clock tick events, creating a new
|
||||
|
|
|
@ -230,7 +230,7 @@ and converts a list of colors into an image.
|
|||
#reader scribble/comment-reader
|
||||
(schemeblock
|
||||
;; -- @scheme[empty]
|
||||
;; -- @scheme[(cons (unsyntax @tech{Color}) List-of-color)]
|
||||
;; -- @scheme[(cons #, @tech{Color} List-of-color)]
|
||||
;; Interpretation: represents a list of colors.
|
||||
))
|
||||
|
||||
|
|
|
@ -23,10 +23,11 @@ default configuration shipped with the server is used. The optional
|
|||
port and ip-address arguments override the corresponding portions of
|
||||
the @scheme[configuration-table].
|
||||
|
||||
The @scheme[configuration-table] is given to @scheme[configuration-table->web-config\@]
|
||||
and used to construct a @scheme[web-config^] unit,
|
||||
and is linked with the @scheme[web-server\@] unit. The resulting unit is invoked, and
|
||||
the server runs until the process is killed.
|
||||
The @scheme[configuration-table] is given to
|
||||
@scheme[configuration-table->web-config@] and used to construct a
|
||||
@scheme[web-config^] unit, and is linked with the
|
||||
@scheme[web-server@] unit. The resulting unit is invoked, and the
|
||||
server runs until the process is killed.
|
||||
|
||||
To run the web server with MrEd, use
|
||||
|
||||
|
@ -49,10 +50,10 @@ dispatcher. See @filepath{run.ss} for an example of such a script.
|
|||
[#:max-waiting max-waiting integer? 40]
|
||||
[#:initial-connection-timeout initial-connection-timeout integer? 60])
|
||||
(-> void)]{
|
||||
Constructs an appropriate @scheme[dispatch-config^], invokes the @scheme[dispatch-server\@],
|
||||
and calls its @scheme[serve] function.
|
||||
Constructs an appropriate @scheme[dispatch-config^], invokes the
|
||||
@scheme[dispatch-server@], and calls its @scheme[serve] function.
|
||||
}
|
||||
|
||||
|
||||
@; XXX Not the right `server' above.
|
||||
|
||||
Here's an example of a simple web server that serves files
|
||||
|
|
|
@ -55,7 +55,8 @@ Provides contains the following identifiers.
|
|||
[#:listen-ip listen-ip (or/c false/c string?) #f]
|
||||
[#:make-servlet-namespace make-servlet-namespace make-servlet-namespace? (make-make-servlet-namespace)])
|
||||
(unit? web-config^)]{
|
||||
Reads the S-expression at @scheme[path] and calls @scheme[configuration-table-sexpr->web-config\@] appropriately.
|
||||
Reads the S-expression at @scheme[path] and calls
|
||||
@scheme[configuration-table-sexpr->web-config@] appropriately.
|
||||
}
|
||||
|
||||
@defproc[(configuration-table-sexpr->web-config\@ [sexpr list?]
|
||||
|
|
Loading…
Reference in New Issue
Block a user