More reformatting

This commit is contained in:
Eli Barzilay 2010-05-21 16:59:36 -04:00
parent fece1f6d03
commit 28946a0a43
43 changed files with 228 additions and 226 deletions

View File

@ -22,13 +22,13 @@ the Racket side. The longer form behaves similarly to the
@scheme[_cvector] is more efficient; no Racket list or vector is
needed.}
@defproc[(make-cvector [type ctype?][length exact-nonnegative-integer?]) cvector?]{
@defproc[(make-cvector [type ctype?] [length exact-nonnegative-integer?]) cvector?]{
Allocates a C vector using the given @scheme[type] and
@scheme[length].}
@defproc[(cvector [type ctype?][val any/c] ...) cvector?]{
@defproc[(cvector [type ctype?] [val any/c] ...) cvector?]{
Creates a C vector of the given @scheme[type], initialized to the
given list of @scheme[val]s.}
@ -60,7 +60,7 @@ References the @scheme[k]th element of the @scheme[cvec] C vector.
The result has the type that the C vector uses.}
@defproc[(cvector-set! [cvec cvector?][k exact-nonnegative-integer?][val any]) void?]{
@defproc[(cvector-set! [cvec cvector?] [k exact-nonnegative-integer?] [val any]) void?]{
Sets the @scheme[k]th element of the @scheme[cvec] C vector to
@scheme[val]. The @scheme[val] argument should be a value that can be
@ -72,7 +72,7 @@ used with the type that the C vector uses.}
Converts the @scheme[cvec] C vector object to a list of values.}
@defproc[(list->cvector [lst list?][type ctype?]) cvector?]{
@defproc[(list->cvector [lst list?] [type ctype?]) cvector?]{
Converts the list @scheme[lst] to a C vector of the given
@scheme[type].}

View File

@ -11,13 +11,13 @@ strings (used as memory blocks), or some additional internal objects
(@scheme[ffi-obj]s and callbacks, see @secref["foreign:c-only"]).
Returns @scheme[#f] for other values.}
@defproc[(ptr-equal? [cptr1 cpointer?][cptr2 cpointer?]) boolean?]{
@defproc[(ptr-equal? [cptr1 cpointer?] [cptr2 cpointer?]) boolean?]{
Compares the values of the two pointers. Two different Racket
pointer objects can contain the same pointer.}
@defproc[(ptr-add [cptr cpointer?][offset exact-integer?][type ctype? _byte])
@defproc[(ptr-add [cptr cpointer?] [offset exact-integer?] [type ctype? _byte])
cpointer?]{
Returns a cpointer that is like @scheme[cptr] offset by
@ -50,7 +50,7 @@ offset is always in bytes.}
@section{Pointer Dereferencing}
@defproc[(set-ptr-offset! [cptr cpointer?][offset exact-integer?][ctype ctype? _byte])
@defproc[(set-ptr-offset! [cptr cpointer?] [offset exact-integer?] [ctype ctype? _byte])
void?]{
Sets the offset component of an offset pointer. The arguments are
@ -58,7 +58,7 @@ used in the same way as @scheme[ptr-add]. If @scheme[cptr] has no
offset, the @scheme[exn:fail:contract] exception is raised.}
@defproc[(ptr-add! [cptr cpointer?][offset exact-integer?][ctype ctype? _byte])
@defproc[(ptr-add! [cptr cpointer?] [offset exact-integer?] [ctype ctype? _byte])
void?]{
Like @scheme[ptr-add], but destructively modifies the offset contained
@ -193,7 +193,7 @@ Returns the Racket object that is the tag of the given @scheme[cptr]
pointer.}
@defproc[(set-cpointer-tag! [cptr cpointer?][tag any/c]) void?]{
@defproc[(set-cpointer-tag! [cptr cpointer?] [tag any/c]) void?]{
Sets the tag of the given @scheme[cptr]. The @scheme[tag] argument can
be any arbitrary value; other pointer operations ignore it. When a
@ -295,7 +295,7 @@ or set the cell's value. The cell must be explicitly freed with
Frees an immobile cell created by @scheme[malloc-immobile-cell].}
@defproc[(register-finalizer [obj any/c][finalizer (any/c . -> . any)]) void?]{
@defproc[(register-finalizer [obj any/c] [finalizer (any/c . -> . any)]) void?]{
Registers a finalizer procedure @scheme[finalizer-proc] with the given
@scheme[obj], which can be any Racket (GC-able) object. The finalizer
@ -354,7 +354,7 @@ debugging message also avoids the problem, since the finalization
procedure would then not close over @scheme[b].)}
@defproc[(make-sized-byte-string [cptr cpointer?][length exact-nonnegative-integer?])
@defproc[(make-sized-byte-string [cptr cpointer?] [length exact-nonnegative-integer?])
bytes?]{
Returns a byte string made of the given pointer and the given length.

View File

@ -52,8 +52,8 @@ just aliases for byte-string bindings: @scheme[make-u8vector],
[(vecr [val number?] (... ...)) ?]
[(? [v any/c]) boolean?]
[(length [vec ?]) exact-nonnegative-integer?]
[(ref [vec ?][k exact-nonnegative-integer?]) number?]
[(! [vec ?][k exact-nonnegative-integer?][val number?]) void?]
[(ref [vec ?] [k exact-nonnegative-integer?]) number?]
[(! [vec ?] [k exact-nonnegative-integer?] [val number?]) void?]
[(list-> [lst (listof number?)]) ?]
[(->list [vec ?]) (listof number?)]
[(->cpointer [vec ?]) cpointer?])

View File

@ -417,10 +417,10 @@
@scheme[keymap:get-search]
}
@defmethod[#:mode augment (after-insert [start exact-nonnegative-integer?][len exact-nonnegative-integer?]) void?]{
@defmethod[#:mode augment (after-insert [start exact-nonnegative-integer?] [len exact-nonnegative-integer?]) void?]{
Re-does any search now that the contents of the window have changed.
}
@defmethod[#:mode augment (after-delete [start exact-nonnegative-integer?][len exact-nonnegative-integer?]) void?]{
@defmethod[#:mode augment (after-delete [start exact-nonnegative-integer?] [len exact-nonnegative-integer?]) void?]{
Re-does any search now that the contents of the window have changed.
}

View File

@ -489,7 +489,7 @@ arguments and add none in their @racket[super-new] expressions:
(define/public (eat food) ....)
(define/public (grow amt) ....)))
(define child% (hungry-mixin (picky-mixin person%)))
(define oliver (new child% [name "Oliver"][age 6]))
(define oliver (new child% [name "Oliver"] [age 6]))
]
Finally, the use of external names for class members (instead of

View File

@ -27,7 +27,7 @@
;; which item is at the given position?
[item-at
(->d ([s stack?][i (and/c positive? (<=/c (count s)))])
(->d ([s stack?] [i (and/c positive? (<=/c (count s)))])
()
[result (stack-p? s)])]
@ -48,7 +48,7 @@
;; creation
[initialize
(->d ([p contract?][s (p p . -> . boolean?)])
(->d ([p contract?] [s (p p . -> . boolean?)])
()
;; Mitchel and McKim use (= (count s) 0) here to express
;; the post-condition in terms of a primitive query
@ -57,7 +57,7 @@
;; commands
;; add an item to the top of the stack
[push
(->d ([s stack?][x (stack-p? s)])
(->d ([s stack?] [x (stack-p? s)])
()
[sn stack?] ;; result kind
#:post-cond

View File

@ -37,7 +37,7 @@
;; how many items are in the dictionary?
[count (-> dictionary? natural-number/c)]
;; does the dictionary define key k?
[has? (->d ([d dictionary?][k symbol?])
[has? (->d ([d dictionary?] [k symbol?])
()
[result boolean?]
#:post-cond
@ -49,7 +49,7 @@
[result (dictionary-value? d)])]
;; initialization
;; post condition: for all k in symbol, (has? d k) is false.
[initialize (->d ([p contract?][eq (p p . -> . boolean?)])
[initialize (->d ([p contract?] [eq (p p . -> . boolean?)])
()
[result (and/c dictionary? (compose zero? count))])]
;; commands

View File

@ -62,7 +62,7 @@
(and/c queue? (compose null? items)))]
;; commands
[put (->d ([oldq queue?][i (queue-p? oldq)])
[put (->d ([oldq queue?] [i (queue-p? oldq)])
()
[result
(and/c

View File

@ -35,7 +35,7 @@ generating bytecode files.
The bytecode compiler applies all standard optimizations, such as
constant propagation, constant folding, inlining, and dead-code
elimination. For example, in an environment where @racket[+] has its
usual binding, the expression @racket[(let ([x 1][y (lambda () 4)]) (+
usual binding, the expression @racket[(let ([x 1] [y (lambda () 4)]) (+
1 (y)))] is compiled the same as the constant @racket[5].
On some platforms, bytecode is further compiled to native code via a
@ -326,7 +326,7 @@ run-time representation of functions that contain free variables.
For example,
@racketblock[
(let loop ([n 40000000][prev-thunk (lambda () #f)])
(let loop ([n 40000000] [prev-thunk (lambda () #f)])
(if (zero? n)
(prev-thunk)
(loop (sub1 n)
@ -340,7 +340,7 @@ The compiler can eliminate many closures automatically. For example,
in
@racketblock[
(let loop ([n 40000000][prev-val #f])
(let loop ([n 40000000] [prev-val #f])
(let ([prev-thunk (lambda () n)])
(if (zero? n)
prev-val

View File

@ -208,6 +208,6 @@ used at the beginning of an expression to enable multiple uses of
@interaction[
(eval:alts @#,(elem @racketmetafont{#reader}@racket["dollar.rkt"]@hspace[1]
@racket[(let ([a @#,tt{$1*2+3$}][b @#,tt{$5/6$}]) $a+b$)])
#reader"dollar.rkt" (let ([a $1*2+3$][b $5/6$]) $a+b$))
@racket[(let ([a @#,tt{$1*2+3$}] [b @#,tt{$5/6$}]) $a+b$)])
#reader"dollar.rkt" (let ([a $1*2+3$] [b $5/6$]) $a+b$))
]

View File

@ -112,7 +112,7 @@ guidelines may help explain when using @racket[set!] is appropriate.
@as-examples[@t{Ok example:}
@def+int[
(define (sum lst)
(let loop ([lst lst][s 0])
(let loop ([lst lst] [s 0])
(if (null? lst)
s
(loop (cdr lst) (+ s (car lst))))))

View File

@ -48,13 +48,13 @@ returns the first of the values that were put into @scheme[ach]. If
@scheme[async-channel] is empty, the result is @scheme[#f].}
@defproc[(async-channel-put [ach async-channel?][v any/c]) void?]{
@defproc[(async-channel-put [ach async-channel?] [v any/c]) void?]{
Puts @scheme[v] into @scheme[ach], blocking if @scheme[ach]'s buffer
is full until space is available.}
@defproc[(async-channel-put-evt [async-channel channel?][v any/c])
@defproc[(async-channel-put-evt [async-channel channel?] [v any/c])
evt?]{
Returns a @tech{synchronizable event} that is blocked while

View File

@ -389,7 +389,7 @@ string.
@; ----------------------------------------
@section{Bytes to Bytes Encoding Conversion}
@defproc[(bytes-open-converter [from-name string?][to-name string?])
@defproc[(bytes-open-converter [from-name string?] [to-name string?])
bytes-converter?]{
Produces a @deftech{byte converter} to go from the encoding named by

View File

@ -41,13 +41,13 @@ Blocks until a sender is ready to provide a value through
Receives and returns a value from @scheme[ch] if a sender is
immediately ready, otherwise returns @scheme[#f].}
@defproc[(channel-put [ch channel?][v any/c]) void?]{
@defproc[(channel-put [ch channel?] [v any/c]) void?]{
Blocks until a receiver is ready to accept the value @scheme[v]
through @scheme[ch].}
@defproc[(channel-put-evt [ch channel?][v any/c]) evt?]{
@defproc[(channel-put-evt [ch channel?] [v any/c]) evt?]{
Returns a fresh @tech{synchronizable event} for use with
@scheme[sync]. The event is ready when @scheme[(channel-put ch v)]

View File

@ -909,7 +909,7 @@ Returns @scheme[#t] for values produced by @scheme[member-name-key]
and @scheme[generate-member-key], @scheme[#f]
otherwise.}
@defproc[(member-name-key=? [a-key member-name-key?][b-key member-name-key?]) boolean?]{
@defproc[(member-name-key=? [a-key member-name-key?] [b-key member-name-key?]) boolean?]{
Produces @scheme[#t] if member-name keys @scheme[a-key] and
@scheme[b-key] represent the same external name, @scheme[#f]
@ -1004,7 +1004,7 @@ initialization (unlike objects in C++).
@defproc[(make-object [class class?][init-v any/c] ...) object?]{
@defproc[(make-object [class class?] [init-v any/c] ...) object?]{
Creates an instance of @scheme[class]. The @scheme[init-v]s are
passed as initialization arguments, bound to the initialization
@ -1908,7 +1908,7 @@ Determines if two objects are the same object, or not; this procedure uses
@scheme[eq?], but also works properly with contracts.}
@defproc[(object->vector [object object?][opaque-v any/c #f]) vector?]{
@defproc[(object->vector [object object?] [opaque-v any/c #f]) vector?]{
Returns a vector representing @scheme[object] that shows its
inspectable fields, analogous to @scheme[struct->vector].}
@ -1925,32 +1925,32 @@ Returns the interface implicitly defined by the class of
@scheme[object].}
@defproc[(is-a? [v any/c][type (or/c interface? class?)]) boolean?]{
@defproc[(is-a? [v any/c] [type (or/c interface? class?)]) boolean?]{
Returns @scheme[#t] if @scheme[v] is an instance of a class
@scheme[type] or a class that implements an interface @scheme[type],
@scheme[#f] otherwise.}
@defproc[(subclass? [v any/c][class class?]) boolean?]{
@defproc[(subclass? [v any/c] [class class?]) boolean?]{
Returns @scheme[#t] if @scheme[v] is a class derived from (or equal
to) @scheme[class], @scheme[#f] otherwise.}
@defproc[(implementation? [v any/c][interface interface?]) boolean?]{
@defproc[(implementation? [v any/c] [interface interface?]) boolean?]{
Returns @scheme[#t] if @scheme[v] is a class that implements
@scheme[interface], @scheme[#f] otherwise.}
@defproc[(interface-extension? [v any/c][interface interface?]) boolean?]{
@defproc[(interface-extension? [v any/c] [interface interface?]) boolean?]{
Returns @scheme[#t] if @scheme[v] is an interface that extends
@scheme[interface], @scheme[#f] otherwise.}
@defproc[(method-in-interface? [sym symbol?][interface interface?]) boolean?]{
@defproc[(method-in-interface? [sym symbol?] [interface interface?]) boolean?]{
Returns @scheme[#t] if @scheme[interface] (or any of its ancestor
interfaces) includes a member with the name @scheme[sym], @scheme[#f]
@ -1965,7 +1965,7 @@ methods whose names are local (i.e., declared with
@scheme[define-local-member-names]).}
@defproc[(object-method-arity-includes? [object object?][sym symbol?][cnt exact-nonnegative-integer?])
@defproc[(object-method-arity-includes? [object object?] [sym symbol?] [cnt exact-nonnegative-integer?])
boolean?]{
Returns @scheme[#t] if @scheme[object] has a method named @scheme[sym]

View File

@ -177,13 +177,13 @@ flat-contract?]{ Returns a flat contract that requires the
input to be a between @racket[n] and @racket[m] or equal to
one of them.}
@defproc[(real-in [n real?][m real?]) flat-contract?]{
@defproc[(real-in [n real?] [m real?]) flat-contract?]{
Returns a flat contract that requires the input to be a real number
between @racket[n] and @racket[m], inclusive.}
@defproc[(integer-in [j exact-integer?][k exact-integer?]) flat-contract?]{
@defproc[(integer-in [j exact-integer?] [k exact-integer?]) flat-contract?]{
Returns a flat contract that requires the input to be an exact integer
between @racket[j] and @racket[k], inclusive.}
@ -283,7 +283,7 @@ Returns a contract that recognizes non-empty lists whose elements match
the contract @racket[c]. Beware that when this contract is applied to
a value, the result is not necessarily @racket[eq?] to the input.}
@defproc[(cons/c [car-c contract?][cdr-c contract?]) contract?]{
@defproc[(cons/c [car-c contract?] [cdr-c contract?]) contract?]{
Produces a contract the recognizes pairs first and second elements
match @racket[car-c] and @racket[cdr-c], respectively. Beware that

View File

@ -47,7 +47,7 @@ for newly created threads, @tech{file-stream ports}, TCP ports,
@tech{TCP listeners}, @tech{UDP sockets}, and @tech{byte converters}.}
@defproc[(custodian-managed-list [cust custodian?][super custodian?]) list?]{
@defproc[(custodian-managed-list [cust custodian?] [super custodian?]) list?]{
Returns a list of immediately managed objects (not including
@tech{custodian box}es) and subordinate custodians for @racket[cust],
@ -108,7 +108,7 @@ must be the same as @racket[limit-cust], so that excessively large
immediate allocations can be rejected with an
@racket[exn:fail:out-of-memory] exception.}
@defproc[(make-custodian-box [cust custodian?][v any/c]) custodian-box?]{
@defproc[(make-custodian-box [cust custodian?] [v any/c]) custodian-box?]{
Returns a @tech{custodian box} that contains @racket[v] as long as
@racket[cust] has not been shut down.}

View File

@ -155,7 +155,7 @@ not including the leading @litchar{#:}.}
Returns a keyword whose @scheme[display]ed form is the same as that of
@scheme[str], but with a leading @litchar{#:}.}
@defproc[(keyword<? [a-keyword keyword?][b-keyword keyword?] ...+) boolean?]{
@defproc[(keyword<? [a-keyword keyword?] [b-keyword keyword?] ...+) boolean?]{
Returns @scheme[#t] if the arguments are sorted, where the comparison
for each pair of keywords is the same as using

View File

@ -26,7 +26,7 @@ particular required arity (e.g., @racket[call-with-input-file],
@;------------------------------------------------------------------------
@section[#:tag "errorproc"]{Raising Exceptions}
@defproc[(raise [v any/c][barrier? any/c #t]) any]{
@defproc[(raise [v any/c] [barrier? any/c #t]) any]{
Raises an exception, where @racket[v] represents the exception being
raised. The @racket[v] argument can be anything; it is passed to the
@ -57,8 +57,8 @@ exception handler obtains control, and the handler itself is
]}
@defproc*[([(error [sym symbol?]) any]
[(error [msg string?][v any/c] ...) any]
[(error [src symbol?][frmat string?][v any/c] ...) any])]{
[(error [msg string?] [v any/c] ...) any]
[(error [src symbol?] [frmat string?] [v any/c] ...) any])]{
Raises the exception @racket[exn:fail], which contains an error
string. The different forms produce the error string in different
@ -94,8 +94,8 @@ In all cases, the constructed message string is passed to
]}
@defproc*[([(raise-user-error [sym symbol?]) any]
[(raise-user-error [msg string?][v any/c] ...) any]
[(raise-user-error [src symbol?][format string?][v any/c] ...) any])]{
[(raise-user-error [msg string?] [v any/c] ...) any]
[(raise-user-error [src symbol?] [format string?] [v any/c] ...) any])]{
Like @racket[error], but constructs an exception with
@racket[make-exn:fail:user] instead of @racket[make-exn:fail]. The
@ -111,8 +111,8 @@ for end users.
]}
@defproc*[([(raise-type-error [name symbol?][expected string?][v any/c]) any]
[(raise-type-error [name symbol?][expected string?][bad-pos exact-nonnegative-integer?][v any/c] ...) any])]{
@defproc*[([(raise-type-error [name symbol?] [expected string?] [v any/c]) any]
[(raise-type-error [name symbol?] [expected string?] [bad-pos exact-nonnegative-integer?] [v any/c] ...) any])]{
Creates an @racket[exn:fail:contract] value and @racket[raise]s it as
an exception. The @racket[name] argument is used as the source
@ -142,7 +142,7 @@ message names the bad argument and also lists the other arguments. If
(feed-animals 'cow 'sheep 'dog 'cat)
]}
@defproc[(raise-mismatch-error [name symbol?][message string?][v any/c]) any]{
@defproc[(raise-mismatch-error [name symbol?] [message string?] [v any/c]) any]{
Creates an @racket[exn:fail:contract] value and @racket[raise]s it as
an exception. The @racket[name] is used as the source procedure's
@ -237,7 +237,7 @@ through a combination of the @racket[name], @racket[expr], and
@;------------------------------------------------------------------------
@section{Handling Exceptions}
@defproc[(call-with-exception-handler [f (any/c . -> . any)][thunk (-> any)]) any]{
@defproc[(call-with-exception-handler [f (any/c . -> . any)] [thunk (-> any)]) any]{
Installs @racket[f] as the @tech{exception handler} for the
@tech{dynamic extent} of the call to @racket[thunk]. If an exception

View File

@ -311,7 +311,7 @@ OS X, this size excludes the resource-fork size. On error (e.g., if no
such file exists), the @exnraise[exn:fail:filesystem].}
@defproc[(copy-file [src path-string?][dest path-string?]) void?]{
@defproc[(copy-file [src path-string?] [dest path-string?]) void?]{
Creates the file @racket[dest] as a copy of @racket[src]. If the file
is not successfully copied, the @exnraise[exn:fail:filesystem]. If
@ -320,7 +320,7 @@ preserved in the copy. Under Mac OS X, the resource fork is also
preserved in the copy. If @racket[src] refers to a link, the target of
the link is copied, rather than the link itself.}
@defproc[(make-file-or-directory-link [to path-string?][path path-string?])
@defproc[(make-file-or-directory-link [to path-string?] [path path-string?])
void?]{
Creates a link @racket[path] to @racket[to] under @|AllUnix|. The
@ -663,7 +663,7 @@ Displays each element of @racket[lst] to @racket[path], adding
@racket[exists-flag] arguments are the same as for
@racket[open-output-file].}
@defproc[(copy-directory/files [src path-string?][dest path-string?])
@defproc[(copy-directory/files [src path-string?] [dest path-string?])
void?]{
Copies the file or directory @racket[src] to @racket[dest], raising

View File

@ -63,7 +63,7 @@ manager can reclaim key--value pairs even when the value refers to the
key.
@defproc[(make-ephemeron [key any/c][v any/c]) ephemeron?]{
@defproc[(make-ephemeron [key any/c] [v any/c]) ephemeron?]{
Returns a new @tech{ephemeron} whose key is @racket[key] and whose
value is initially @racket[v].}
@ -129,7 +129,7 @@ Returns @racket[#t] if @racket[v] is a will executor, @racket[#f]
otherwise.}
@defproc[(will-register [executor will-executor?][v any/c][proc (any/c . -> . any)])
@defproc[(will-register [executor will-executor?] [v any/c] [proc (any/c . -> . any)])
void?]{
Registers the value @racket[v] with the will procedure @racket[proc]

View File

@ -87,13 +87,13 @@ Returns a newly allocated @tech{mutable list} with the same elements as
Returns the number of elements in @racket[mlst].}
@defproc[(mlist-ref [mlst mlist?][pos exact-nonnegative-integer?])
@defproc[(mlist-ref [mlst mlist?] [pos exact-nonnegative-integer?])
any/c]{
Like @racket[list-ref], but for @tech{mutable lists}.}
@defproc[(mlist-tail [mlst mlist?][pos exact-nonnegative-integer?])
@defproc[(mlist-tail [mlst mlist?] [pos exact-nonnegative-integer?])
any/c]{
Like @racket[list-tail], but for @tech{mutable lists}.}

View File

@ -355,7 +355,7 @@ otherwise.}
@mz-examples[(denominator 5) (denominator 34/8) (denominator 2.3)]}
@defproc[(rationalize [x real?][tolerance real?]) real?]{
@defproc[(rationalize [x real?] [tolerance real?]) real?]{
Among the real numbers within @racket[(abs tolerance)] of @racket[x],
returns the one corresponding to an exact number whose
@ -886,10 +886,10 @@ they are as safe as generic operations like @racket[+].
@subsection{Flonum Arithmetic}
@deftogether[(
@defproc[(fl+ [a inexact-real?][b inexact-real?]) inexact-real?]
@defproc[(fl- [a inexact-real?][b inexact-real?]) inexact-real?]
@defproc[(fl* [a inexact-real?][b inexact-real?]) inexact-real?]
@defproc[(fl/ [a inexact-real?][b inexact-real?]) inexact-real?]
@defproc[(fl+ [a inexact-real?] [b inexact-real?]) inexact-real?]
@defproc[(fl- [a inexact-real?] [b inexact-real?]) inexact-real?]
@defproc[(fl* [a inexact-real?] [b inexact-real?]) inexact-real?]
@defproc[(fl/ [a inexact-real?] [b inexact-real?]) inexact-real?]
@defproc[(flabs [a inexact-real?]) inexact-real?]
)]{
@ -898,13 +898,13 @@ but constrained to consume @tech{flonums}. The result is always a
@tech{flonum}.}
@deftogether[(
@defproc[(fl= [a inexact-real?][b inexact-real?]) boolean?]
@defproc[(fl< [a inexact-real?][b inexact-real?]) boolean?]
@defproc[(fl> [a inexact-real?][b inexact-real?]) boolean?]
@defproc[(fl<= [a inexact-real?][b inexact-real?]) boolean?]
@defproc[(fl>= [a inexact-real?][b inexact-real?]) boolean?]
@defproc[(flmin [a inexact-real?][b inexact-real?]) inexact-real?]
@defproc[(flmax [a inexact-real?][b inexact-real?]) inexact-real?]
@defproc[(fl= [a inexact-real?] [b inexact-real?]) boolean?]
@defproc[(fl< [a inexact-real?] [b inexact-real?]) boolean?]
@defproc[(fl> [a inexact-real?] [b inexact-real?]) boolean?]
@defproc[(fl<= [a inexact-real?] [b inexact-real?]) boolean?]
@defproc[(fl>= [a inexact-real?] [b inexact-real?]) boolean?]
@defproc[(flmin [a inexact-real?] [b inexact-real?]) inexact-real?]
@defproc[(flmax [a inexact-real?] [b inexact-real?]) inexact-real?]
)]{
Like @racket[=], @racket[<], @racket[>], @racket[<=], @racket[>=],
@ -912,9 +912,9 @@ Like @racket[=], @racket[<], @racket[>], @racket[<=], @racket[>=],
@tech{flonums}.}
@deftogether[(
@defproc[(flround [a inexact-real?]) inexact-real?]
@defproc[(flfloor [a inexact-real?]) inexact-real?]
@defproc[(flceiling [a inexact-real?]) inexact-real?]
@defproc[(flround [a inexact-real?]) inexact-real?]
@defproc[(flfloor [a inexact-real?]) inexact-real?]
@defproc[(flceiling [a inexact-real?]) inexact-real?]
@defproc[(fltruncate [a inexact-real?]) inexact-real?]
)]{
@ -922,14 +922,14 @@ Like @racket[round], @racket[floor], @racket[ceiling], and
@racket[truncate], but constrained to consume @tech{flonums}.}
@deftogether[(
@defproc[(flsin [a inexact-real?]) inexact-real?]
@defproc[(flcos [a inexact-real?]) inexact-real?]
@defproc[(fltan [a inexact-real?]) inexact-real?]
@defproc[(flsin [a inexact-real?]) inexact-real?]
@defproc[(flcos [a inexact-real?]) inexact-real?]
@defproc[(fltan [a inexact-real?]) inexact-real?]
@defproc[(flasin [a inexact-real?]) inexact-real?]
@defproc[(flacos [a inexact-real?]) inexact-real?]
@defproc[(flatan [a inexact-real?]) inexact-real?]
@defproc[(fllog [a inexact-real?]) inexact-real?]
@defproc[(flexp [a inexact-real?]) inexact-real?]
@defproc[(fllog [a inexact-real?]) inexact-real?]
@defproc[(flexp [a inexact-real?]) inexact-real?]
@defproc[(flsqrt [a inexact-real?]) inexact-real?]
)]{
@ -1024,13 +1024,13 @@ encountering crashes with code that uses unsafe fixnum operations, use
the @racketmodname[racket/fixnum] library to help debug the problems.
@deftogether[(
@defproc[(fx+ [a fixnum?][b fixnum?]) fixnum?]
@defproc[(fx- [a fixnum?][b fixnum?]) fixnum?]
@defproc[(fx* [a fixnum?][b fixnum?]) fixnum?]
@defproc[(fxquotient [a fixnum?][b fixnum?]) fixnum?]
@defproc[(fxremainder [a fixnum?][b fixnum?]) fixnum?]
@defproc[(fxmodulo [a fixnum?][b fixnum?]) fixnum?]
@defproc[(fxabs [a fixnum?]) fixnum?]
@defproc[(fx+ [a fixnum?] [b fixnum?]) fixnum?]
@defproc[(fx- [a fixnum?] [b fixnum?]) fixnum?]
@defproc[(fx* [a fixnum?] [b fixnum?]) fixnum?]
@defproc[(fxquotient [a fixnum?] [b fixnum?]) fixnum?]
@defproc[(fxremainder [a fixnum?] [b fixnum?]) fixnum?]
@defproc[(fxmodulo [a fixnum?] [b fixnum?]) fixnum?]
@defproc[(fxabs [a fixnum?]) fixnum?]
)]{
Safe versions of @racket[unsafe-fx+], @racket[unsafe-fx-],
@ -1042,12 +1042,12 @@ result would not be a fixnum.}
@deftogether[(
@defproc[(fxand [a fixnum?][b fixnum?]) fixnum?]
@defproc[(fxior [a fixnum?][b fixnum?]) fixnum?]
@defproc[(fxxor [a fixnum?][b fixnum?]) fixnum?]
@defproc[(fxand [a fixnum?] [b fixnum?]) fixnum?]
@defproc[(fxior [a fixnum?] [b fixnum?]) fixnum?]
@defproc[(fxxor [a fixnum?] [b fixnum?]) fixnum?]
@defproc[(fxnot [a fixnum?]) fixnum?]
@defproc[(fxlshift [a fixnum?][b fixnum?]) fixnum?]
@defproc[(fxrshift [a fixnum?][b fixnum?]) fixnum?]
@defproc[(fxlshift [a fixnum?] [b fixnum?]) fixnum?]
@defproc[(fxrshift [a fixnum?] [b fixnum?]) fixnum?]
)]{
Safe versions of @racket[unsafe-fxand], @racket[unsafe-fxior],
@ -1058,13 +1058,13 @@ result would not be a fixnum.}
@deftogether[(
@defproc[(fx= [a fixnum?][b fixnum?]) boolean?]
@defproc[(fx< [a fixnum?][b fixnum?]) boolean?]
@defproc[(fx> [a fixnum?][b fixnum?]) boolean?]
@defproc[(fx<= [a fixnum?][b fixnum?]) boolean?]
@defproc[(fx>= [a fixnum?][b fixnum?]) boolean?]
@defproc[(fxmin [a fixnum?][b fixnum?]) fixnum?]
@defproc[(fxmax [a fixnum?][b fixnum?]) fixnum?]
@defproc[(fx= [a fixnum?] [b fixnum?]) boolean?]
@defproc[(fx< [a fixnum?] [b fixnum?]) boolean?]
@defproc[(fx> [a fixnum?] [b fixnum?]) boolean?]
@defproc[(fx<= [a fixnum?] [b fixnum?]) boolean?]
@defproc[(fx>= [a fixnum?] [b fixnum?]) boolean?]
@defproc[(fxmin [a fixnum?] [b fixnum?]) fixnum?]
@defproc[(fxmax [a fixnum?] [b fixnum?]) fixnum?]
)]{
Safe versions of @racket[unsafe-fx=], @racket[unsafe-fx<],

View File

@ -153,7 +153,7 @@ Returns @scheme[#t] if @scheme[v] is a parameter procedure,
@scheme[#f] otherwise.}
@defproc[(parameter-procedure=? [a parameter?][b parameter?]) boolean?]{
@defproc[(parameter-procedure=? [a parameter?] [b parameter?]) boolean?]{
Returns @scheme[#t] if the parameter procedures @scheme[a] and
@scheme[b] always modify the same parameter with the same guards

View File

@ -357,7 +357,7 @@ of the path), where @litchar{~} by itself indicates the home directory
of the current user.}
@defproc[(simplify-path [path path-string?][use-filesystem? boolean? #t]) path?]{
@defproc[(simplify-path [path path-string?] [use-filesystem? boolean? #t]) path?]{
Eliminates redundant path separators (except for a single trailing
separator), up-directory @litchar{..}, and same-directory @litchar{.}

View File

@ -57,7 +57,7 @@ buffers; when called on a port without a buffer, @scheme[flush-output]
has no effect.}
@defproc*[([(file-stream-buffer-mode [port port?]) (or/c 'none 'line 'block #f)]
[(file-stream-buffer-mode [port port?][mode (or/c 'none 'line 'block)]) void?])]{
[(file-stream-buffer-mode [port port?] [mode (or/c 'none 'line 'block)]) void?])]{
Gets or sets the buffer mode for @scheme[port], if
possible. @tech{File-stream ports} support setting the buffer mode,

View File

@ -84,22 +84,22 @@ Equivalent to
(lambda (p) (parameterize ([current-output-port p])
(proc))))]}
@defproc[(call-with-input-string [str string?][proc (input-port? . -> . any)]) any]{
@defproc[(call-with-input-string [str string?] [proc (input-port? . -> . any)]) any]{
Equivalent to @scheme[(proc (open-input-string str))].}
@defproc[(call-with-input-bytes [bstr bytes?][proc (input-port? . -> . any)]) any]{
@defproc[(call-with-input-bytes [bstr bytes?] [proc (input-port? . -> . any)]) any]{
Equivalent to @scheme[(proc (open-input-bytes bstr))].}
@defproc[(with-input-from-string [str string?][proc (-> any)]) any]{
@defproc[(with-input-from-string [str string?] [proc (-> any)]) any]{
Equivalent to
@schemeblock[(parameterize ([current-input-port (open-input-string str)])
(proc))]}
@defproc[(with-input-from-bytes [bstr bytes?][proc (-> any)]) any]{
@defproc[(with-input-from-bytes [bstr bytes?] [proc (-> any)]) any]{
Equivalent to
@ -111,7 +111,7 @@ Equivalent to
@section{Creating Ports}
@defproc[(input-port-append [close-at-eof? any/c][in input-port?] ...) input-port?]{
@defproc[(input-port-append [close-at-eof? any/c] [in input-port?] ...) input-port?]{
Takes any number of input ports and returns an input port. Reading
from the input port draws bytes (and special non-byte values) from the
@ -269,7 +269,7 @@ See also @scheme[input-port-append], which concatenates input streams
instead of interleaving them.}
@defproc[(open-output-nowhere [name any/c 'nowhere][special-ok? any/c #t])
@defproc[(open-output-nowhere [name any/c 'nowhere] [special-ok? any/c #t])
output-port?]{
Creates and returns an output port that discards all output sent to it
@ -488,7 +488,7 @@ mid-stream @scheme[eof], the @scheme[eof] is consumed by the event
only if the event is chosen in a synchronization.}
@defproc[(read-bytes-evt [k exact-nonnegative-integer?][in input-port?])
@defproc[(read-bytes-evt [k exact-nonnegative-integer?] [in input-port?])
evt?]{
Returns a @tech{synchronizable event} is that is ready when @scheme[k]
@ -532,7 +532,7 @@ sensibly used multiple times until a successful choice, but should not
be used in multiple concurrent synchronizations.}
@defproc[(read-bytes-avail!-evt [bstr (and/c bytes? (not/c immutable?))][in input-port?])
@defproc[(read-bytes-avail!-evt [bstr (and/c bytes? (not/c immutable?))] [in input-port?])
evt?]{
Like @scheme[read-bytes!-evt], except that the event reads only as
@ -540,7 +540,7 @@ many bytes as are immediately available, after at least one byte or
one @scheme[eof] becomes available.}
@defproc[(read-string-evt [k exact-nonnegative-integer?][in input-port?])
@defproc[(read-string-evt [k exact-nonnegative-integer?] [in input-port?])
evt?]{
Like @scheme[read-bytes-evt], but for character strings instead of
@ -577,14 +577,14 @@ bytes in the port's stream.}
Like @scheme[read-line-evt], but returns a byte string instead of a
string.}
@defproc*[([(peek-bytes-evt [k exact-nonnegative-integer?][skip exact-nonnegative-integer?]
[progress evt?][in input-port?]) evt?]
[(peek-bytes!-evt [bstr (and/c bytes? (not/c immutable?))][skip exact-nonnegative-integer?]
[progress (or/c evt? #f)][in input-port?]) evt?]
[(peek-bytes-avail!-evt [bstr (and/c bytes? (not/c immutable?))][skip exact-nonnegative-integer?]
[progress (or/c evt? #f)][in input-port?]) evt?]
[(peek-string-evt [k exact-nonnegative-integer?][in input-port?]) evt?]
[(peek-string!-evt [str (and/c string? (not/c immutable?))][in input-port?]) evt?])]{
@defproc*[([(peek-bytes-evt [k exact-nonnegative-integer?] [skip exact-nonnegative-integer?]
[progress evt?] [in input-port?]) evt?]
[(peek-bytes!-evt [bstr (and/c bytes? (not/c immutable?))] [skip exact-nonnegative-integer?]
[progress (or/c evt? #f)] [in input-port?]) evt?]
[(peek-bytes-avail!-evt [bstr (and/c bytes? (not/c immutable?))] [skip exact-nonnegative-integer?]
[progress (or/c evt? #f)] [in input-port?]) evt?]
[(peek-string-evt [k exact-nonnegative-integer?] [in input-port?]) evt?]
[(peek-string!-evt [str (and/c string? (not/c immutable?))] [in input-port?]) evt?])]{
Like the @scheme[read-...-evt] functions, but for peeking. The
@scheme[skip] argument indicates the number of bytes to skip, and
@ -643,7 +643,7 @@ a conversion error occurs at any point while reading @scheme[in], then
@exnraise[exn:fail].}
@defproc[(copy-port [in input-port?][out output-port?] ...+) void?]{
@defproc[(copy-port [in input-port?] [out output-port?] ...+) void?]{
Reads data from @scheme[in] and writes it back out to @scheme[out],
returning when @scheme[in] produces @scheme[eof]. The copy is

View File

@ -44,14 +44,14 @@ tentative recursive prints (e.g., to check the length of the output).}
Same as @scheme[pretty-print], but @scheme[v] is printed like
@scheme[write] instead of like @scheme[print].}
@defproc[(pretty-display [v any/c][port output-port? (current-output-port)])
@defproc[(pretty-display [v any/c] [port output-port? (current-output-port)])
void?]{
Same as @scheme[pretty-print], but @scheme[v] is printed like
@scheme[display] instead of like @scheme[print].}
@defproc[(pretty-format [v any/c][columns exact-nonnegative-integer? (pretty-print-columns)])
@defproc[(pretty-format [v any/c] [columns exact-nonnegative-integer? (pretty-print-columns)])
string?]{
Like @scheme[pretty-print], except that it returns a string containing
@ -205,7 +205,7 @@ the parameter is consulted.
@section{Line-Output Hook}
@defproc[(pretty-print-newline [port out-port?][width exact-nonnegative-integer?]) void?]{
@defproc[(pretty-print-newline [port out-port?] [width exact-nonnegative-integer?]) void?]{
Calls the procedure associated with the
@scheme[pretty-print-print-line] parameter to print a newline to
@ -366,7 +366,7 @@ hook procedures, etc. Explicitly cancel the tentative print even when
@defproc[(tentative-pretty-print-port-transfer
[tentative-out output-port?][orig-out output-port?])
[tentative-out output-port?] [orig-out output-port?])
void?]{
Causes the data written to @scheme[tentative-out] to be transferred as

View File

@ -159,7 +159,7 @@ value (see @secref["special-comments"]) to cause the consumed
character to be treated as whitespace, and it might use
@racket[read/recursive] or @racket[read-syntax/recursive].}
@defproc[(readtable-mapping [readtable readtable?][char character?])
@defproc[(readtable-mapping [readtable readtable?] [char character?])
(values (or/c character?
(or/c 'terminating-macro
'non-terminating-macro))

View File

@ -10,7 +10,7 @@ Gets the value of an operating system environment variable. The
environment variable named by @racket[name] exists, its value is
returned (as a string); otherwise, @racket[#f] is returned.}
@defproc[(putenv [name string?][value string?]) boolean?]{
@defproc[(putenv [name string?] [value string?]) boolean?]{
Sets the value of an operating system environment variable. The
@racket[name] and @racket[value] arguments are strings that cannot

View File

@ -3,14 +3,14 @@
@title{Byte and String Output}
@defproc[(write-char [char character?][out output-port? (current-output-port)])
@defproc[(write-char [char character?] [out output-port? (current-output-port)])
void?]{
Writes a single character to @racket[out]; more precisely, the bytes
that are the UTF-8 encoding of @racket[char] are written to
@racket[out].}
@defproc[(write-byte [byte any/c][out output-port? (current-output-port)])
@defproc[(write-byte [byte any/c] [out output-port? (current-output-port)])
void?]{
Writes a single byte to @racket[out].}
@ -90,14 +90,14 @@ writing and breaks: if breaking is disabled when
no bytes will have been written to @racket[out]. See also
@secref["breakhandler"].}
@defproc[(write-special [v any/c][out output-port? (current-output-port)]) boolean?]{
@defproc[(write-special [v any/c] [out output-port? (current-output-port)]) boolean?]{
Writes @racket[v] directly to @racket[out] if the port supports
special writes, or raises @racket[exn:fail:contract] if the port does
not support special write. The result is always @racket[#t],
indicating that the write succeeded.}
@defproc[(write-special-avail* [v any/c][out output-port? (current-output-port)]) boolean?]{
@defproc[(write-special-avail* [v any/c] [out output-port? (current-output-port)]) boolean?]{
Like @racket[write-special], but without blocking. If @racket[v]
cannot be written immediately, the result is @racket[#f] without
@ -123,7 +123,7 @@ buffer (if any) is flushed, otherwise the result is a positive exact
integer. If the event is not selected in a synchronization, then no
bytes will have been written to @racket[out].}
@defproc[(write-special-evt [v any/c][out output-port? (current-output-port)]) evt?]{
@defproc[(write-special-evt [v any/c] [out output-port? (current-output-port)]) evt?]{
Similar to @racket[write-special], but instead of writing the special
value immediately, it returns a synchronizable event (see

View File

@ -7,14 +7,14 @@ String input and output ports do not need to be explicitly closed. The
@scheme[file-position] procedure works for string ports in
position-setting mode.
@defproc[(open-input-bytes [bstr bytes?][name any/c 'string]) input-port?]{
@defproc[(open-input-bytes [bstr bytes?] [name any/c 'string]) input-port?]{
Creates an input port that reads characters from @scheme[bstr] (see
@secref["bytestrings"]). Modifying @scheme[bstr] afterward does not
affect the byte stream produced by the port. The optional
@scheme[name] argument is used as the name for the returned port.}
@defproc[(open-input-string [str string?][name any/c 'string]) input-port?]{
@defproc[(open-input-string [str string?] [name any/c 'string]) input-port?]{
Creates an input port that reads bytes from the UTF-8 encoding (see
@secref["encodings"]) of @scheme[str]. The optional @scheme[name]

View File

@ -3,7 +3,7 @@
@title[#:tag "stxcmp"]{Syntax Object Bindings}
@defproc[(bound-identifier=? [a-id syntax?][b-id syntax?]
@defproc[(bound-identifier=? [a-id syntax?] [b-id syntax?]
[phase-level (or/c exact-integer? #f)
(syntax-local-phase-level)])
boolean?]{
@ -15,7 +15,7 @@ suitable expression context at the @tech{phase level} indicated by
@scheme[phase-level] corresponds to the @tech{label phase level}.}
@defproc[(free-identifier=? [a-id syntax?][b-id syntax?]
@defproc[(free-identifier=? [a-id syntax?] [b-id syntax?]
[phase-level (or/c exact-integer? #f)
(syntax-local-phase-level)])
boolean?]{
@ -34,15 +34,15 @@ to a @tech{rename transformer}, the identifiers may return distinct
results with @scheme[syntax-e].}
@defproc[(free-transformer-identifier=? [a-id syntax?][b-id syntax?]) boolean?]{
@defproc[(free-transformer-identifier=? [a-id syntax?] [b-id syntax?]) boolean?]{
Same as @scheme[(free-identifier=? a-id b-id (add1 (syntax-local-phase-level)))].}
@defproc[(free-template-identifier=? [a-id syntax?][b-id syntax?]) boolean?]{
@defproc[(free-template-identifier=? [a-id syntax?] [b-id syntax?]) boolean?]{
Same as @scheme[(free-identifier=? a-id b-id (sub1 (syntax-local-phase-level)))].}
@defproc[(free-label-identifier=? [a-id syntax?][b-id syntax?]) boolean?]{
@defproc[(free-label-identifier=? [a-id syntax?] [b-id syntax?]) boolean?]{
Same as @scheme[(free-identifier=? a-id b-id #f)].}

View File

@ -98,9 +98,8 @@ information on properties and byte codes.
@;------------------------------------------------------------------------
@defproc*[([(syntax-property [stx syntax?][key any/c][v any/c])
syntax?]
[(syntax-property [stx syntax?][key any/c]) any])]{
@defproc*[([(syntax-property [stx syntax?] [key any/c] [v any/c]) syntax?]
[(syntax-property [stx syntax?] [key any/c]) any])]{
The three-argument form extends @racket[stx] by associating an
arbitrary property value @racket[v] with the key @racket[key]; the
@ -119,7 +118,7 @@ in @racket[stx]. @tech{Uninterned} symbols (see @secref["symbols"])
are not included in the result list.}
@defproc[(syntax-track-origin [new-stx syntax?][orig-stx syntax?][id-stx syntax?])
@defproc[(syntax-track-origin [new-stx syntax?] [orig-stx syntax?] [id-stx syntax?])
any]{
Adds properties to @racket[new-stx] in the same way that macro

View File

@ -503,7 +503,7 @@ within a @scheme[module] form, or if it is not a run-time expression,
then the @exnraise[exn:fail:contract].}
@defproc[(syntax-local-lift-require [raw-require-spec any/c][stx syntax?])
@defproc[(syntax-local-lift-require [raw-require-spec any/c] [stx syntax?])
syntax?]{
Lifts a @scheme[#%require] form corresponding to

View File

@ -101,7 +101,7 @@ success. If the process terminated due to a fault or signal, the exit
code is non-zero.}
@defproc[(subprocess-kill [subproc subprocess?][force? any/c]) void?]{
@defproc[(subprocess-kill [subproc subprocess?] [force? any/c]) void?]{
Terminates the subprocess represented by @racket[subproc] if
@racket[force?] is true and if the process still running. If an error
@ -127,7 +127,10 @@ otherwise.}
@defproc[(shell-execute [verb (or/c string? #f)]
[target string?][parameters string?][dir path-string?][show-mode symbol?])
[target string?]
[parameters string?]
[dir path-string?]
[show-mode symbol?])
#f]
@index['("ShellExecute")]{Performs} the action specified by @racket[verb]
@ -237,8 +240,8 @@ containing no nul characters. If the command succeeds, the return
value is @racket[#t], @racket[#f] otherwise.}
@defproc*[([(system* [command path-string?][arg string?] ...) boolean?]
[(system* [command path-string?][exact 'exact][arg string?]) boolean?])]{
@defproc*[([(system* [command path-string?] [arg string?] ...) boolean?]
[(system* [command path-string?] [exact 'exact] [arg string?]) boolean?])]{
Like @racket[system], except that @racket[command] is a filename that
is executed directly (instead of through a shell command), and the
@ -257,8 +260,8 @@ Like @racket[system], except that the result is the exit code returned
by the subprocess. A @racket[0] result normally indicates success.}
@defproc*[([(system*/exit-code [command path-string?][arg string?] ...) (integer-in 0 255)]
[(system*/exit-code [command path-string?][exact 'exact][arg string?]) (integer-in 0 255)])]{
@defproc*[([(system*/exit-code [command path-string?] [arg string?] ...) (integer-in 0 255)]
[(system*/exit-code [command path-string?] [exact 'exact] [arg string?]) (integer-in 0 255)])]{
Like @racket[system*], but returns the exit code like
@racket[system/exit-code].}
@ -318,8 +321,8 @@ be explicitly closed with @racket[close-input-port] or
@racket[close-output-port].}
@defproc*[([(process* [command path-string?][arg string?] ...) list?]
[(process* [command path-string?][exact 'exact][arg string?]) list?])]{
@defproc*[([(process* [command path-string?] [arg string?] ...) list?]
[(process* [command path-string?] [exact 'exact] [arg string?]) list?])]{
Like @racket[process], except that @racket[command] is a filename that
is executed directly, and the @racket[arg]s are the arguments. Under

View File

@ -26,7 +26,7 @@ values can be imperatively installed into the current thread through
another call to @scheme[current-preserved-thread-cell-values]. The
capturing and restoring threads can be different.
@defproc[(make-thread-cell [v any/c][preserved? any/c #f]) thread-cell?]{
@defproc[(make-thread-cell [v any/c] [preserved? any/c #f]) thread-cell?]{
Creates and returns a new thread cell. Initially, @scheme[v] is the
cell's value for all threads. If @scheme[preserved?] is true, then the
@ -43,7 +43,7 @@ Returns @scheme[#t] if @scheme[v] is a thread cell created by
@defproc[(thread-cell-ref [cell thread-cell?]) any]{Returns the
current value of @scheme[cell] for the current thread.}
@defproc[(thread-cell-set! [cell thread-cell?][v any/c]) any]{Sets the
@defproc[(thread-cell-set! [cell thread-cell?] [v any/c]) any]{Sets the
value in @scheme[cell] to @scheme[v] for the current thread.}
@examples[

View File

@ -102,7 +102,7 @@ manage @racket[thd] (and none of its subordinates manages
@racket[thd]), the @exnraise[exn:fail:contract], and the thread is not
suspended.}
@defproc[(thread-resume [thd thread?][benefactor (or/c thread? custodian? #f) #f]) void?]{
@defproc[(thread-resume [thd thread?] [benefactor (or/c thread? custodian? #f) #f]) void?]{
Resumes the execution of @racket[thd] if it is suspended and has at
least one custodian (possibly added through @racket[benefactor], as

View File

@ -34,13 +34,13 @@ operations can be prevented by adjusting the code inspector (see
@section{Unsafe Numeric Operations}
@deftogether[(
@defproc[(unsafe-fx+ [a fixnum?][b fixnum?]) fixnum?]
@defproc[(unsafe-fx- [a fixnum?][b fixnum?]) fixnum?]
@defproc[(unsafe-fx* [a fixnum?][b fixnum?]) fixnum?]
@defproc[(unsafe-fxquotient [a fixnum?][b fixnum?]) fixnum?]
@defproc[(unsafe-fxremainder [a fixnum?][b fixnum?]) fixnum?]
@defproc[(unsafe-fxmodulo [a fixnum?][b fixnum?]) fixnum?]
@defproc[(unsafe-fxabs [a fixnum?]) fixnum?]
@defproc[(unsafe-fx+ [a fixnum?] [b fixnum?]) fixnum?]
@defproc[(unsafe-fx- [a fixnum?] [b fixnum?]) fixnum?]
@defproc[(unsafe-fx* [a fixnum?] [b fixnum?]) fixnum?]
@defproc[(unsafe-fxquotient [a fixnum?] [b fixnum?]) fixnum?]
@defproc[(unsafe-fxremainder [a fixnum?] [b fixnum?]) fixnum?]
@defproc[(unsafe-fxmodulo [a fixnum?] [b fixnum?]) fixnum?]
@defproc[(unsafe-fxabs [a fixnum?]) fixnum?]
)]{
For @tech{fixnums}: Like @scheme[+], @scheme[-], @scheme[*],
@ -53,12 +53,12 @@ For @tech{fixnums}: Like @scheme[+], @scheme[-], @scheme[*],
@deftogether[(
@defproc[(unsafe-fxand [a fixnum?][b fixnum?]) fixnum?]
@defproc[(unsafe-fxior [a fixnum?][b fixnum?]) fixnum?]
@defproc[(unsafe-fxxor [a fixnum?][b fixnum?]) fixnum?]
@defproc[(unsafe-fxand [a fixnum?] [b fixnum?]) fixnum?]
@defproc[(unsafe-fxior [a fixnum?] [b fixnum?]) fixnum?]
@defproc[(unsafe-fxxor [a fixnum?] [b fixnum?]) fixnum?]
@defproc[(unsafe-fxnot [a fixnum?]) fixnum?]
@defproc[(unsafe-fxlshift [a fixnum?][b fixnum?]) fixnum?]
@defproc[(unsafe-fxrshift [a fixnum?][b fixnum?]) fixnum?]
@defproc[(unsafe-fxlshift [a fixnum?] [b fixnum?]) fixnum?]
@defproc[(unsafe-fxrshift [a fixnum?] [b fixnum?]) fixnum?]
)]{
For @tech{fixnums}: Like @scheme[bitwise-and], @scheme[bitwise-ior],
@ -76,13 +76,13 @@ bits in the result beyond the the number of bits used to represent a
@deftogether[(
@defproc[(unsafe-fx= [a fixnum?][b fixnum?]) boolean?]
@defproc[(unsafe-fx< [a fixnum?][b fixnum?]) boolean?]
@defproc[(unsafe-fx> [a fixnum?][b fixnum?]) boolean?]
@defproc[(unsafe-fx<= [a fixnum?][b fixnum?]) boolean?]
@defproc[(unsafe-fx>= [a fixnum?][b fixnum?]) boolean?]
@defproc[(unsafe-fxmin [a fixnum?][b fixnum?]) fixnum?]
@defproc[(unsafe-fxmax [a fixnum?][b fixnum?]) fixnum?]
@defproc[(unsafe-fx= [a fixnum?] [b fixnum?]) boolean?]
@defproc[(unsafe-fx< [a fixnum?] [b fixnum?]) boolean?]
@defproc[(unsafe-fx> [a fixnum?] [b fixnum?]) boolean?]
@defproc[(unsafe-fx<= [a fixnum?] [b fixnum?]) boolean?]
@defproc[(unsafe-fx>= [a fixnum?] [b fixnum?]) boolean?]
@defproc[(unsafe-fxmin [a fixnum?] [b fixnum?]) fixnum?]
@defproc[(unsafe-fxmax [a fixnum?] [b fixnum?]) fixnum?]
)]{
For @tech{fixnums}: Like @scheme[=], @scheme[<], @scheme[>],
@ -96,10 +96,10 @@ Unchecked version of @scheme[->fl].
@deftogether[(
@defproc[(unsafe-fl+ [a inexact-real?][b inexact-real?]) inexact-real?]
@defproc[(unsafe-fl- [a inexact-real?][b inexact-real?]) inexact-real?]
@defproc[(unsafe-fl* [a inexact-real?][b inexact-real?]) inexact-real?]
@defproc[(unsafe-fl/ [a inexact-real?][b inexact-real?]) inexact-real?]
@defproc[(unsafe-fl+ [a inexact-real?] [b inexact-real?]) inexact-real?]
@defproc[(unsafe-fl- [a inexact-real?] [b inexact-real?]) inexact-real?]
@defproc[(unsafe-fl* [a inexact-real?] [b inexact-real?]) inexact-real?]
@defproc[(unsafe-fl/ [a inexact-real?] [b inexact-real?]) inexact-real?]
@defproc[(unsafe-flabs [a inexact-real?]) inexact-real?]
)]{
@ -108,11 +108,11 @@ For @tech{flonums}: Unchecked versions of @scheme[fl+], @scheme[fl-],
@deftogether[(
@defproc[(unsafe-fl= [a inexact-real?][b inexact-real?]) boolean?]
@defproc[(unsafe-fl< [a inexact-real?][b inexact-real?]) boolean?]
@defproc[(unsafe-fl> [a inexact-real?][b inexact-real?]) boolean?]
@defproc[(unsafe-fl<= [a inexact-real?][b inexact-real?]) boolean?]
@defproc[(unsafe-fl>= [a inexact-real?][b inexact-real?]) boolean?]
@defproc[(unsafe-fl= [a inexact-real?] [b inexact-real?]) boolean?]
@defproc[(unsafe-fl< [a inexact-real?] [b inexact-real?]) boolean?]
@defproc[(unsafe-fl> [a inexact-real?] [b inexact-real?]) boolean?]
@defproc[(unsafe-fl<= [a inexact-real?] [b inexact-real?]) boolean?]
@defproc[(unsafe-fl>= [a inexact-real?] [b inexact-real?]) boolean?]
@defproc[(unsafe-flmin [a inexact-real?]) inexact-real?]
@defproc[(unsafe-flmax [a inexact-real?]) inexact-real?]
)]{
@ -171,9 +171,9 @@ Unsafe variants of @scheme[car], @scheme[cdr], @scheme[mcar],
@deftogether[(
@defproc[(unsafe-unbox [v (and/c box? (not/c chaperone?))]) any/c]
@defproc[(unsafe-set-box! [v (and/c box? (not/c chaperone?))][val any/c]) void?]
@defproc[(unsafe-set-box! [v (and/c box? (not/c chaperone?))] [val any/c]) void?]
@defproc[(unsafe-unbox* [b box?]) fixnum?]
@defproc[(unsafe-set-box*! [b box?][k fixnum?]) void?]
@defproc[(unsafe-set-box*! [b box?] [k fixnum?]) void?]
)]{
Unsafe versions of @scheme[unbox] and @scheme[set-box!].}
@ -181,11 +181,11 @@ Unsafe versions of @scheme[unbox] and @scheme[set-box!].}
@deftogether[(
@defproc[(unsafe-vector-length [v (and/c vector? (not/c chaperone?))]) fixnum?]
@defproc[(unsafe-vector-ref [v (and/c vector? (not/c chaperone?))][k fixnum?]) any/c]
@defproc[(unsafe-vector-set! [v (and/c vector? (not/c chaperone?))][k fixnum?][val any/c]) void?]
@defproc[(unsafe-vector-ref [v (and/c vector? (not/c chaperone?))] [k fixnum?]) any/c]
@defproc[(unsafe-vector-set! [v (and/c vector? (not/c chaperone?))] [k fixnum?] [val any/c]) void?]
@defproc[(unsafe-vector*-length [v vector?]) fixnum?]
@defproc[(unsafe-vector*-ref [v vector?][k fixnum?]) any/c]
@defproc[(unsafe-vector*-set! [v vector?][k fixnum?][val any/c]) void?]
@defproc[(unsafe-vector*-ref [v vector?] [k fixnum?]) any/c]
@defproc[(unsafe-vector*-set! [v vector?] [k fixnum?] [val any/c]) void?]
)]{
Unsafe versions of @scheme[vector-length], @scheme[vector-ref], and
@ -196,9 +196,9 @@ fixnum).}
@deftogether[(
@defproc[(unsafe-string-length [str string?]) fixnum?]
@defproc[(unsafe-string-ref [str string?][k fixnum?])
@defproc[(unsafe-string-ref [str string?] [k fixnum?])
(and/c char? (lambda (ch) (<= 0 (char->integer ch) 255)))]
@defproc[(unsafe-string-set! [str (and/c string? (not/c immutable?))][k fixnum?][ch char?]) void?]
@defproc[(unsafe-string-set! [str (and/c string? (not/c immutable?))] [k fixnum?] [ch char?]) void?]
)]{
Unsafe versions of @scheme[string-length], @scheme[string-ref], and
@ -210,8 +210,8 @@ always returns a fixnum).}
@deftogether[(
@defproc[(unsafe-bytes-length [bstr bytes?]) fixnum?]
@defproc[(unsafe-bytes-ref [bstr bytes?][k fixnum?]) byte?]
@defproc[(unsafe-bytes-set! [bstr (and/c bytes? (not/c immutable?))][k fixnum?][b byte?]) void?]
@defproc[(unsafe-bytes-ref [bstr bytes?] [k fixnum?]) byte?]
@defproc[(unsafe-bytes-set! [bstr (and/c bytes? (not/c immutable?))] [k fixnum?] [b byte?]) void?]
)]{
Unsafe versions of @scheme[bytes-length], @scheme[bytes-ref], and
@ -222,8 +222,8 @@ fixnum).}
@deftogether[(
@defproc[(unsafe-flvector-length [v flvector?]) fixnum?]
@defproc[(unsafe-flvector-ref [v flvector?][k fixnum?]) any/c]
@defproc[(unsafe-flvector-set! [v flvector?][k fixnum?][x inexact-real?]) void?]
@defproc[(unsafe-flvector-ref [v flvector?] [k fixnum?]) any/c]
@defproc[(unsafe-flvector-set! [v flvector?] [k fixnum?] [x inexact-real?]) void?]
)]{
Unsafe versions of @scheme[flvector-length], @scheme[flvector-ref], and
@ -233,8 +233,8 @@ fixnum).}
@deftogether[(
@defproc[(unsafe-f64vector-ref [vec f64vector?][k fixnum?]) inexact-real?]
@defproc[(unsafe-f64vector-set! [vec f64vector?][k fixnum?][n inexact-real?]) void?]
@defproc[(unsafe-f64vector-ref [vec f64vector?] [k fixnum?]) inexact-real?]
@defproc[(unsafe-f64vector-set! [vec f64vector?] [k fixnum?] [n inexact-real?]) void?]
)]{
Unsafe versions of @scheme[f64vector-ref] and
@ -242,10 +242,10 @@ Unsafe versions of @scheme[f64vector-ref] and
@deftogether[(
@defproc[(unsafe-struct-ref [v (not/c chaperone?)][k fixnum?]) any/c]
@defproc[(unsafe-struct-set! [v (not/c chaperone?)][k fixnum?][val any/c]) void?]
@defproc[(unsafe-struct*-ref [v any/c][k fixnum?]) any/c]
@defproc[(unsafe-struct*-set! [v any/c][k fixnum?][val any/c]) void?]
@defproc[(unsafe-struct-ref [v (not/c chaperone?)] [k fixnum?]) any/c]
@defproc[(unsafe-struct-set! [v (not/c chaperone?)] [k fixnum?] [val any/c]) void?]
@defproc[(unsafe-struct*-ref [v any/c] [k fixnum?]) any/c]
@defproc[(unsafe-struct*-set! [v any/c] [k fixnum?] [val any/c]) void?]
)]{
Unsafe field access and update for an instance of a structure

View File

@ -6,7 +6,7 @@
@title{Writing}
@defproc[(write [datum any/c][out output-port? (current-output-port)])
@defproc[(write [datum any/c] [out output-port? (current-output-port)])
void?]{
Writes @racket[datum] to @racket[out], normally in such a way that
@ -28,7 +28,7 @@ initial cycle check.
(get-output-string o)
]}
@defproc[(display [datum any/c][out output-port? (current-output-port)])
@defproc[(display [datum any/c] [out output-port? (current-output-port)])
void?]{
Displays @racket[datum] to @racket[out], similar to @racket[write],
@ -43,7 +43,7 @@ printer. In particular, note that @racket[display] may require memory
proportional to the depth of the value being printed, due to the
initial cycle check.}
@defproc[(print [datum any/c][out output-port? (current-output-port)]
@defproc[(print [datum any/c] [out output-port? (current-output-port)]
[quote-depth (or/c 0 1) 0])
void?]{
@ -67,13 +67,13 @@ are free to modify the actual output generated by @racket[print] in
any way.}
@defproc[(displayln [datum any/c][out output-port? (current-output-port)])
@defproc[(displayln [datum any/c] [out output-port? (current-output-port)])
void?]{
The same as @racket[(display datum out)] followed by @racket[(newline out)],
which is similar to @as-index{@tt{println}} in Pascal or Java.}
@defproc[(fprintf [out output-port?][form string?][v any/c] ...) void?]{
@defproc[(fprintf [out output-port?] [form string?] [v any/c] ...) void?]{
Prints formatted output to @racket[out], where @racket[form] is a string
that is printed directly, except for special formatting
@ -138,13 +138,13 @@ supplied than are used by the format string, the
"(3 4)")
]}
@defproc[(printf [form string?][v any/c] ...) void?]{
@defproc[(printf [form string?] [v any/c] ...) void?]{
The same as @racket[(fprintf (current-output-port) form v ...)].}
@defproc[(eprintf [form string?][v any/c] ...) void?]{
@defproc[(eprintf [form string?] [v any/c] ...) void?]{
The same as @racket[(fprintf (current-error-port) form v ...)].}
@defproc[(format [form string?][v any/c] ...) string?]{
@defproc[(format [form string?] [v any/c] ...) string?]{
Formats to a string. The result is the same as
@racketblock[

View File

@ -1015,7 +1015,7 @@ whether the resulting information originated from an external source
(i.e., a different document).}
@defproc[(resolve-search [dep-key any/c][p (or/c part? false/c)] [ri resolve-info?] [key info-key?])
@defproc[(resolve-search [dep-key any/c] [p (or/c part? false/c)] [ri resolve-info?] [key info-key?])
void?]{
Like @racket[resolve-get], but a shared @racket[dep-key] groups

View File

@ -118,7 +118,7 @@ coerced to one.
@deftogether[(
@defproc[(make-styled-paragraph [content list?][style any/c]) paragraph?]
@defproc[(make-styled-paragraph [content list?] [style any/c]) paragraph?]
@defproc[(styled-paragraph? [v any/c]) boolean?]
@defproc[(styled-paragraph-style [p paragraph?]) style?]
)]{
@ -171,7 +171,7 @@ is an alias for @racket[itemization?], and
@racket[styled-itemization-style] is an alias for
@racket[itemization-style].}
@defproc[(make-blockquote [style any/c][blocks (listof block?)])
@defproc[(make-blockquote [style any/c] [blocks (listof block?)])
nested-flow?]{
@compat[] Like @racket[make-nested-flow], but @racket[style] is
@ -199,14 +199,14 @@ formats to the current one.}
@deftogether[(
@defproc[(make-element [style any/c] [content list?]) element?]
@defproc[(make-toc-element [style any/c] [content list?][toc-content list?]) toc-element?]
@defproc[(make-target-element [style any/c] [content list?][tag tag?]) target-element?]
@defproc[(make-toc-target-element [style any/c] [content list?][tag tag?]) toc-target-element?]
@defproc[(make-page-target-element [style any/c] [content list?][tag tag?]) page-target-element?]
@defproc[(make-redirect-target-element [style any/c] [content list?][tag tag?]
@defproc[(make-toc-element [style any/c] [content list?] [toc-content list?]) toc-element?]
@defproc[(make-target-element [style any/c] [content list?] [tag tag?]) target-element?]
@defproc[(make-toc-target-element [style any/c] [content list?] [tag tag?]) toc-target-element?]
@defproc[(make-page-target-element [style any/c] [content list?] [tag tag?]) page-target-element?]
@defproc[(make-redirect-target-element [style any/c] [content list?] [tag tag?]
[alt-path path-string?] [alt-anchor string?]) redirect-target-element?]
@defproc[(make-link-element [style any/c] [content list?][tag tag?]) link-element?]
@defproc[(make-index-element [style any/c] [content list?][tag tag?]
@defproc[(make-link-element [style any/c] [content list?] [tag tag?]) link-element?]
@defproc[(make-index-element [style any/c] [content list?] [tag tag?]
[tag tag?] [plain-seq (and/c pair? (listof string?))]
[entry-seq list?] [desc any/c]) index-element?]
)]{

View File

@ -137,9 +137,9 @@ the font and text colors are not guaranteed to be anything in
particular.}
@defproc*[([(blank [size real? 0]) pict?]
[(blank [w real?][h real?]) pict?]
[(blank [w real?][a real?][d real?]) pict?]
[(blank [w real?][h real?][a real?][d real?]) pict?])]{
[(blank [w real?] [h real?]) pict?]
[(blank [w real?] [a real?] [d real?]) pict?]
[(blank [w real?] [h real?] [a real?] [d real?]) pict?])]{
Creates a pict that draws nothing. The one-argument case supplies a
value sued for both the width and height. In the one- and two-argument