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 @scheme[_cvector] is more efficient; no Racket list or vector is
needed.} 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 Allocates a C vector using the given @scheme[type] and
@scheme[length].} @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 Creates a C vector of the given @scheme[type], initialized to the
given list of @scheme[val]s.} 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.} 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 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 @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.} 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 Converts the list @scheme[lst] to a C vector of the given
@scheme[type].} @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"]). (@scheme[ffi-obj]s and callbacks, see @secref["foreign:c-only"]).
Returns @scheme[#f] for other values.} 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 Compares the values of the two pointers. Two different Racket
pointer objects can contain the same pointer.} 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?]{ cpointer?]{
Returns a cpointer that is like @scheme[cptr] offset by Returns a cpointer that is like @scheme[cptr] offset by
@ -50,7 +50,7 @@ offset is always in bytes.}
@section{Pointer Dereferencing} @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?]{ void?]{
Sets the offset component of an offset pointer. The arguments are 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.} 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?]{ void?]{
Like @scheme[ptr-add], but destructively modifies the offset contained 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.} 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 Sets the tag of the given @scheme[cptr]. The @scheme[tag] argument can
be any arbitrary value; other pointer operations ignore it. When a 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].} 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 Registers a finalizer procedure @scheme[finalizer-proc] with the given
@scheme[obj], which can be any Racket (GC-able) object. The finalizer @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].)} 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?]{ bytes?]{
Returns a byte string made of the given pointer and the given length. 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?] (... ...)) ?] [(vecr [val number?] (... ...)) ?]
[(? [v any/c]) boolean?] [(? [v any/c]) boolean?]
[(length [vec ?]) exact-nonnegative-integer?] [(length [vec ?]) exact-nonnegative-integer?]
[(ref [vec ?][k exact-nonnegative-integer?]) number?] [(ref [vec ?] [k exact-nonnegative-integer?]) number?]
[(! [vec ?][k exact-nonnegative-integer?][val number?]) void?] [(! [vec ?] [k exact-nonnegative-integer?] [val number?]) void?]
[(list-> [lst (listof number?)]) ?] [(list-> [lst (listof number?)]) ?]
[(->list [vec ?]) (listof number?)] [(->list [vec ?]) (listof number?)]
[(->cpointer [vec ?]) cpointer?]) [(->cpointer [vec ?]) cpointer?])

View File

@ -417,10 +417,10 @@
@scheme[keymap:get-search] @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. 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. 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 (eat food) ....)
(define/public (grow amt) ....))) (define/public (grow amt) ....)))
(define child% (hungry-mixin (picky-mixin person%))) (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 Finally, the use of external names for class members (instead of

View File

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

View File

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

View File

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

View File

@ -35,7 +35,7 @@ generating bytecode files.
The bytecode compiler applies all standard optimizations, such as The bytecode compiler applies all standard optimizations, such as
constant propagation, constant folding, inlining, and dead-code constant propagation, constant folding, inlining, and dead-code
elimination. For example, in an environment where @racket[+] has its 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]. 1 (y)))] is compiled the same as the constant @racket[5].
On some platforms, bytecode is further compiled to native code via a 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, For example,
@racketblock[ @racketblock[
(let loop ([n 40000000][prev-thunk (lambda () #f)]) (let loop ([n 40000000] [prev-thunk (lambda () #f)])
(if (zero? n) (if (zero? n)
(prev-thunk) (prev-thunk)
(loop (sub1 n) (loop (sub1 n)
@ -340,7 +340,7 @@ The compiler can eliminate many closures automatically. For example,
in in
@racketblock[ @racketblock[
(let loop ([n 40000000][prev-val #f]) (let loop ([n 40000000] [prev-val #f])
(let ([prev-thunk (lambda () n)]) (let ([prev-thunk (lambda () n)])
(if (zero? n) (if (zero? n)
prev-val prev-val

View File

@ -208,6 +208,6 @@ used at the beginning of an expression to enable multiple uses of
@interaction[ @interaction[
(eval:alts @#,(elem @racketmetafont{#reader}@racket["dollar.rkt"]@hspace[1] (eval:alts @#,(elem @racketmetafont{#reader}@racket["dollar.rkt"]@hspace[1]
@racket[(let ([a @#,tt{$1*2+3$}][b @#,tt{$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$)) #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:} @as-examples[@t{Ok example:}
@def+int[ @def+int[
(define (sum lst) (define (sum lst)
(let loop ([lst lst][s 0]) (let loop ([lst lst] [s 0])
(if (null? lst) (if (null? lst)
s s
(loop (cdr lst) (+ s (car lst)))))) (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].} @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 Puts @scheme[v] into @scheme[ach], blocking if @scheme[ach]'s buffer
is full until space is available.} 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?]{ evt?]{
Returns a @tech{synchronizable event} that is blocked while Returns a @tech{synchronizable event} that is blocked while

View File

@ -389,7 +389,7 @@ string.
@; ---------------------------------------- @; ----------------------------------------
@section{Bytes to Bytes Encoding Conversion} @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?]{ bytes-converter?]{
Produces a @deftech{byte converter} to go from the encoding named by 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 Receives and returns a value from @scheme[ch] if a sender is
immediately ready, otherwise returns @scheme[#f].} 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] Blocks until a receiver is ready to accept the value @scheme[v]
through @scheme[ch].} 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 Returns a fresh @tech{synchronizable event} for use with
@scheme[sync]. The event is ready when @scheme[(channel-put ch v)] @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] and @scheme[generate-member-key], @scheme[#f]
otherwise.} 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 Produces @scheme[#t] if member-name keys @scheme[a-key] and
@scheme[b-key] represent the same external name, @scheme[#f] @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 Creates an instance of @scheme[class]. The @scheme[init-v]s are
passed as initialization arguments, bound to the initialization 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.} @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 Returns a vector representing @scheme[object] that shows its
inspectable fields, analogous to @scheme[struct->vector].} inspectable fields, analogous to @scheme[struct->vector].}
@ -1925,32 +1925,32 @@ Returns the interface implicitly defined by the class of
@scheme[object].} @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 Returns @scheme[#t] if @scheme[v] is an instance of a class
@scheme[type] or a class that implements an interface @scheme[type], @scheme[type] or a class that implements an interface @scheme[type],
@scheme[#f] otherwise.} @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 Returns @scheme[#t] if @scheme[v] is a class derived from (or equal
to) @scheme[class], @scheme[#f] otherwise.} 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 Returns @scheme[#t] if @scheme[v] is a class that implements
@scheme[interface], @scheme[#f] otherwise.} @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 Returns @scheme[#t] if @scheme[v] is an interface that extends
@scheme[interface], @scheme[#f] otherwise.} @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 Returns @scheme[#t] if @scheme[interface] (or any of its ancestor
interfaces) includes a member with the name @scheme[sym], @scheme[#f] 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]).} @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?]{ boolean?]{
Returns @scheme[#t] if @scheme[object] has a method named @scheme[sym] 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 input to be a between @racket[n] and @racket[m] or equal to
one of them.} 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 Returns a flat contract that requires the input to be a real number
between @racket[n] and @racket[m], inclusive.} 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 Returns a flat contract that requires the input to be an exact integer
between @racket[j] and @racket[k], inclusive.} 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 the contract @racket[c]. Beware that when this contract is applied to
a value, the result is not necessarily @racket[eq?] to the input.} 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 Produces a contract the recognizes pairs first and second elements
match @racket[car-c] and @racket[cdr-c], respectively. Beware that 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}.} @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 Returns a list of immediately managed objects (not including
@tech{custodian box}es) and subordinate custodians for @racket[cust], @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 immediate allocations can be rejected with an
@racket[exn:fail:out-of-memory] exception.} @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 Returns a @tech{custodian box} that contains @racket[v] as long as
@racket[cust] has not been shut down.} @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 Returns a keyword whose @scheme[display]ed form is the same as that of
@scheme[str], but with a leading @litchar{#:}.} @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 Returns @scheme[#t] if the arguments are sorted, where the comparison
for each pair of keywords is the same as using 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} @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 Raises an exception, where @racket[v] represents the exception being
raised. The @racket[v] argument can be anything; it is passed to the 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] @defproc*[([(error [sym symbol?]) any]
[(error [msg string?][v any/c] ...) any] [(error [msg string?] [v any/c] ...) any]
[(error [src symbol?][frmat string?][v any/c] ...) any])]{ [(error [src symbol?] [frmat string?] [v any/c] ...) any])]{
Raises the exception @racket[exn:fail], which contains an error Raises the exception @racket[exn:fail], which contains an error
string. The different forms produce the error string in different 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] @defproc*[([(raise-user-error [sym symbol?]) any]
[(raise-user-error [msg 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])]{ [(raise-user-error [src symbol?] [format string?] [v any/c] ...) any])]{
Like @racket[error], but constructs an exception with Like @racket[error], but constructs an exception with
@racket[make-exn:fail:user] instead of @racket[make-exn:fail]. The @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] @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])]{ [(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 Creates an @racket[exn:fail:contract] value and @racket[raise]s it as
an exception. The @racket[name] argument is used as the source 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) (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 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 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} @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 Installs @racket[f] as the @tech{exception handler} for the
@tech{dynamic extent} of the call to @racket[thunk]. If an exception @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].} 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 Creates the file @racket[dest] as a copy of @racket[src]. If the file
is not successfully copied, the @exnraise[exn:fail:filesystem]. If 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 preserved in the copy. If @racket[src] refers to a link, the target of
the link is copied, rather than the link itself.} 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?]{ void?]{
Creates a link @racket[path] to @racket[to] under @|AllUnix|. The 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[exists-flag] arguments are the same as for
@racket[open-output-file].} @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?]{ void?]{
Copies the file or directory @racket[src] to @racket[dest], raising 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. 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 Returns a new @tech{ephemeron} whose key is @racket[key] and whose
value is initially @racket[v].} value is initially @racket[v].}
@ -129,7 +129,7 @@ Returns @racket[#t] if @racket[v] is a will executor, @racket[#f]
otherwise.} 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?]{ void?]{
Registers the value @racket[v] with the will procedure @racket[proc] 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].} 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]{ any/c]{
Like @racket[list-ref], but for @tech{mutable lists}.} 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]{ any/c]{
Like @racket[list-tail], but for @tech{mutable lists}.} 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)]} @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], Among the real numbers within @racket[(abs tolerance)] of @racket[x],
returns the one corresponding to an exact number whose 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} @subsection{Flonum Arithmetic}
@deftogether[( @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?] @defproc[(flabs [a inexact-real?]) inexact-real?]
)]{ )]{
@ -898,13 +898,13 @@ but constrained to consume @tech{flonums}. The result is always a
@tech{flonum}.} @tech{flonum}.}
@deftogether[( @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[(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[(flmin [a inexact-real?] [b inexact-real?]) inexact-real?]
@defproc[(flmax [a inexact-real?][b inexact-real?]) inexact-real?] @defproc[(flmax [a inexact-real?] [b inexact-real?]) inexact-real?]
)]{ )]{
Like @racket[=], @racket[<], @racket[>], @racket[<=], @racket[>=], Like @racket[=], @racket[<], @racket[>], @racket[<=], @racket[>=],
@ -912,9 +912,9 @@ Like @racket[=], @racket[<], @racket[>], @racket[<=], @racket[>=],
@tech{flonums}.} @tech{flonums}.}
@deftogether[( @deftogether[(
@defproc[(flround [a inexact-real?]) inexact-real?] @defproc[(flround [a inexact-real?]) inexact-real?]
@defproc[(flfloor [a inexact-real?]) inexact-real?] @defproc[(flfloor [a inexact-real?]) inexact-real?]
@defproc[(flceiling [a inexact-real?]) inexact-real?] @defproc[(flceiling [a inexact-real?]) inexact-real?]
@defproc[(fltruncate [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}.} @racket[truncate], but constrained to consume @tech{flonums}.}
@deftogether[( @deftogether[(
@defproc[(flsin [a inexact-real?]) inexact-real?] @defproc[(flsin [a inexact-real?]) inexact-real?]
@defproc[(flcos [a inexact-real?]) inexact-real?] @defproc[(flcos [a inexact-real?]) inexact-real?]
@defproc[(fltan [a inexact-real?]) inexact-real?] @defproc[(fltan [a inexact-real?]) inexact-real?]
@defproc[(flasin [a inexact-real?]) inexact-real?] @defproc[(flasin [a inexact-real?]) inexact-real?]
@defproc[(flacos [a inexact-real?]) inexact-real?] @defproc[(flacos [a inexact-real?]) inexact-real?]
@defproc[(flatan [a inexact-real?]) inexact-real?] @defproc[(flatan [a inexact-real?]) inexact-real?]
@defproc[(fllog [a inexact-real?]) inexact-real?] @defproc[(fllog [a inexact-real?]) inexact-real?]
@defproc[(flexp [a inexact-real?]) inexact-real?] @defproc[(flexp [a inexact-real?]) inexact-real?]
@defproc[(flsqrt [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. the @racketmodname[racket/fixnum] library to help debug the problems.
@deftogether[( @deftogether[(
@defproc[(fx+ [a fixnum?][b fixnum?]) fixnum?] @defproc[(fx+ [a fixnum?] [b fixnum?]) fixnum?]
@defproc[(fx- [a fixnum?][b 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[(fxquotient [a fixnum?] [b fixnum?]) fixnum?]
@defproc[(fxremainder [a fixnum?][b fixnum?]) fixnum?] @defproc[(fxremainder [a fixnum?] [b fixnum?]) fixnum?]
@defproc[(fxmodulo [a fixnum?][b fixnum?]) fixnum?] @defproc[(fxmodulo [a fixnum?] [b fixnum?]) fixnum?]
@defproc[(fxabs [a fixnum?]) fixnum?] @defproc[(fxabs [a fixnum?]) fixnum?]
)]{ )]{
Safe versions of @racket[unsafe-fx+], @racket[unsafe-fx-], Safe versions of @racket[unsafe-fx+], @racket[unsafe-fx-],
@ -1042,12 +1042,12 @@ result would not be a fixnum.}
@deftogether[( @deftogether[(
@defproc[(fxand [a fixnum?][b fixnum?]) fixnum?] @defproc[(fxand [a fixnum?] [b fixnum?]) fixnum?]
@defproc[(fxior [a fixnum?][b fixnum?]) fixnum?] @defproc[(fxior [a fixnum?] [b fixnum?]) fixnum?]
@defproc[(fxxor [a fixnum?][b fixnum?]) fixnum?] @defproc[(fxxor [a fixnum?] [b fixnum?]) fixnum?]
@defproc[(fxnot [a fixnum?]) fixnum?] @defproc[(fxnot [a fixnum?]) fixnum?]
@defproc[(fxlshift [a fixnum?][b fixnum?]) fixnum?] @defproc[(fxlshift [a fixnum?] [b fixnum?]) fixnum?]
@defproc[(fxrshift [a fixnum?][b fixnum?]) fixnum?] @defproc[(fxrshift [a fixnum?] [b fixnum?]) fixnum?]
)]{ )]{
Safe versions of @racket[unsafe-fxand], @racket[unsafe-fxior], Safe versions of @racket[unsafe-fxand], @racket[unsafe-fxior],
@ -1058,13 +1058,13 @@ result would not be a fixnum.}
@deftogether[( @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[(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[(fxmin [a fixnum?] [b fixnum?]) fixnum?]
@defproc[(fxmax [a fixnum?][b fixnum?]) fixnum?] @defproc[(fxmax [a fixnum?] [b fixnum?]) fixnum?]
)]{ )]{
Safe versions of @racket[unsafe-fx=], @racket[unsafe-fx<], 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.} @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 Returns @scheme[#t] if the parameter procedures @scheme[a] and
@scheme[b] always modify the same parameter with the same guards @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.} 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 Eliminates redundant path separators (except for a single trailing
separator), up-directory @litchar{..}, and same-directory @litchar{.} 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.} has no effect.}
@defproc*[([(file-stream-buffer-mode [port port?]) (or/c 'none 'line 'block #f)] @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 Gets or sets the buffer mode for @scheme[port], if
possible. @tech{File-stream ports} support setting the buffer mode, 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]) (lambda (p) (parameterize ([current-output-port p])
(proc))))]} (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))].} 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))].} 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 Equivalent to
@schemeblock[(parameterize ([current-input-port (open-input-string str)]) @schemeblock[(parameterize ([current-input-port (open-input-string str)])
(proc))]} (proc))]}
@defproc[(with-input-from-bytes [bstr bytes?][proc (-> any)]) any]{ @defproc[(with-input-from-bytes [bstr bytes?] [proc (-> any)]) any]{
Equivalent to Equivalent to
@ -111,7 +111,7 @@ Equivalent to
@section{Creating Ports} @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 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 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.} 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?]{ output-port?]{
Creates and returns an output port that discards all output sent to it 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.} 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?]{ evt?]{
Returns a @tech{synchronizable event} is that is ready when @scheme[k] 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.} 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?]{ evt?]{
Like @scheme[read-bytes!-evt], except that the event reads only as 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.} 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?]{ evt?]{
Like @scheme[read-bytes-evt], but for character strings instead of 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 Like @scheme[read-line-evt], but returns a byte string instead of a
string.} string.}
@defproc*[([(peek-bytes-evt [k exact-nonnegative-integer?][skip exact-nonnegative-integer?] @defproc*[([(peek-bytes-evt [k exact-nonnegative-integer?] [skip exact-nonnegative-integer?]
[progress evt?][in input-port?]) evt?] [progress evt?] [in input-port?]) evt?]
[(peek-bytes!-evt [bstr (and/c bytes? (not/c immutable?))][skip exact-nonnegative-integer?] [(peek-bytes!-evt [bstr (and/c bytes? (not/c immutable?))] [skip exact-nonnegative-integer?]
[progress (or/c evt? #f)][in input-port?]) evt?] [progress (or/c evt? #f)] [in input-port?]) evt?]
[(peek-bytes-avail!-evt [bstr (and/c bytes? (not/c immutable?))][skip exact-nonnegative-integer?] [(peek-bytes-avail!-evt [bstr (and/c bytes? (not/c immutable?))] [skip exact-nonnegative-integer?]
[progress (or/c evt? #f)][in input-port?]) evt?] [progress (or/c evt? #f)] [in input-port?]) evt?]
[(peek-string-evt [k exact-nonnegative-integer?][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?])]{ [(peek-string!-evt [str (and/c string? (not/c immutable?))] [in input-port?]) evt?])]{
Like the @scheme[read-...-evt] functions, but for peeking. The Like the @scheme[read-...-evt] functions, but for peeking. The
@scheme[skip] argument indicates the number of bytes to skip, and @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].} @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], Reads data from @scheme[in] and writes it back out to @scheme[out],
returning when @scheme[in] produces @scheme[eof]. The copy is 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 Same as @scheme[pretty-print], but @scheme[v] is printed like
@scheme[write] instead of like @scheme[print].} @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?]{ void?]{
Same as @scheme[pretty-print], but @scheme[v] is printed like Same as @scheme[pretty-print], but @scheme[v] is printed like
@scheme[display] instead of like @scheme[print].} @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?]{ string?]{
Like @scheme[pretty-print], except that it returns a string containing Like @scheme[pretty-print], except that it returns a string containing
@ -205,7 +205,7 @@ the parameter is consulted.
@section{Line-Output Hook} @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 Calls the procedure associated with the
@scheme[pretty-print-print-line] parameter to print a newline to @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 @defproc[(tentative-pretty-print-port-transfer
[tentative-out output-port?][orig-out output-port?]) [tentative-out output-port?] [orig-out output-port?])
void?]{ void?]{
Causes the data written to @scheme[tentative-out] to be transferred as 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 character to be treated as whitespace, and it might use
@racket[read/recursive] or @racket[read-syntax/recursive].} @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? (values (or/c character?
(or/c 'terminating-macro (or/c 'terminating-macro
'non-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 environment variable named by @racket[name] exists, its value is
returned (as a string); otherwise, @racket[#f] is returned.} 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 Sets the value of an operating system environment variable. The
@racket[name] and @racket[value] arguments are strings that cannot @racket[name] and @racket[value] arguments are strings that cannot

View File

@ -3,14 +3,14 @@
@title{Byte and String Output} @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?]{ void?]{
Writes a single character to @racket[out]; more precisely, the bytes Writes a single character to @racket[out]; more precisely, the bytes
that are the UTF-8 encoding of @racket[char] are written to that are the UTF-8 encoding of @racket[char] are written to
@racket[out].} @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?]{ void?]{
Writes a single byte to @racket[out].} 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 no bytes will have been written to @racket[out]. See also
@secref["breakhandler"].} @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 Writes @racket[v] directly to @racket[out] if the port supports
special writes, or raises @racket[exn:fail:contract] if the port does special writes, or raises @racket[exn:fail:contract] if the port does
not support special write. The result is always @racket[#t], not support special write. The result is always @racket[#t],
indicating that the write succeeded.} 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] Like @racket[write-special], but without blocking. If @racket[v]
cannot be written immediately, the result is @racket[#f] without 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 integer. If the event is not selected in a synchronization, then no
bytes will have been written to @racket[out].} 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 Similar to @racket[write-special], but instead of writing the special
value immediately, it returns a synchronizable event (see 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 @scheme[file-position] procedure works for string ports in
position-setting mode. 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 Creates an input port that reads characters from @scheme[bstr] (see
@secref["bytestrings"]). Modifying @scheme[bstr] afterward does not @secref["bytestrings"]). Modifying @scheme[bstr] afterward does not
affect the byte stream produced by the port. The optional affect the byte stream produced by the port. The optional
@scheme[name] argument is used as the name for the returned port.} @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 Creates an input port that reads bytes from the UTF-8 encoding (see
@secref["encodings"]) of @scheme[str]. The optional @scheme[name] @secref["encodings"]) of @scheme[str]. The optional @scheme[name]

View File

@ -3,7 +3,7 @@
@title[#:tag "stxcmp"]{Syntax Object Bindings} @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) [phase-level (or/c exact-integer? #f)
(syntax-local-phase-level)]) (syntax-local-phase-level)])
boolean?]{ 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}.} @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) [phase-level (or/c exact-integer? #f)
(syntax-local-phase-level)]) (syntax-local-phase-level)])
boolean?]{ boolean?]{
@ -34,15 +34,15 @@ to a @tech{rename transformer}, the identifiers may return distinct
results with @scheme[syntax-e].} 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)))].} 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)))].} 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)].} 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]) @defproc*[([(syntax-property [stx syntax?] [key any/c] [v any/c]) syntax?]
syntax?] [(syntax-property [stx syntax?] [key any/c]) any])]{
[(syntax-property [stx syntax?][key any/c]) any])]{
The three-argument form extends @racket[stx] by associating an The three-argument form extends @racket[stx] by associating an
arbitrary property value @racket[v] with the key @racket[key]; the 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.} 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]{ any]{
Adds properties to @racket[new-stx] in the same way that macro 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].} 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?]{ syntax?]{
Lifts a @scheme[#%require] form corresponding to 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.} 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 Terminates the subprocess represented by @racket[subproc] if
@racket[force?] is true and if the process still running. If an error @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)] @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] #f]
@index['("ShellExecute")]{Performs} the action specified by @racket[verb] @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.} value is @racket[#t], @racket[#f] otherwise.}
@defproc*[([(system* [command path-string?][arg string?] ...) boolean?] @defproc*[([(system* [command path-string?] [arg string?] ...) boolean?]
[(system* [command path-string?][exact 'exact][arg string?]) boolean?])]{ [(system* [command path-string?] [exact 'exact] [arg string?]) boolean?])]{
Like @racket[system], except that @racket[command] is a filename that Like @racket[system], except that @racket[command] is a filename that
is executed directly (instead of through a shell command), and the 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.} by the subprocess. A @racket[0] result normally indicates success.}
@defproc*[([(system*/exit-code [command path-string?][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)])]{ [(system*/exit-code [command path-string?] [exact 'exact] [arg string?]) (integer-in 0 255)])]{
Like @racket[system*], but returns the exit code like Like @racket[system*], but returns the exit code like
@racket[system/exit-code].} @racket[system/exit-code].}
@ -318,8 +321,8 @@ be explicitly closed with @racket[close-input-port] or
@racket[close-output-port].} @racket[close-output-port].}
@defproc*[([(process* [command path-string?][arg string?] ...) list?] @defproc*[([(process* [command path-string?] [arg string?] ...) list?]
[(process* [command path-string?][exact 'exact][arg string?]) list?])]{ [(process* [command path-string?] [exact 'exact] [arg string?]) list?])]{
Like @racket[process], except that @racket[command] is a filename that Like @racket[process], except that @racket[command] is a filename that
is executed directly, and the @racket[arg]s are the arguments. Under 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 another call to @scheme[current-preserved-thread-cell-values]. The
capturing and restoring threads can be different. 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 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 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 @defproc[(thread-cell-ref [cell thread-cell?]) any]{Returns the
current value of @scheme[cell] for the current thread.} 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.} value in @scheme[cell] to @scheme[v] for the current thread.}
@examples[ @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 @racket[thd]), the @exnraise[exn:fail:contract], and the thread is not
suspended.} 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 Resumes the execution of @racket[thd] if it is suspended and has at
least one custodian (possibly added through @racket[benefactor], as 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} @section{Unsafe Numeric Operations}
@deftogether[( @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-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-fxquotient [a fixnum?] [b fixnum?]) fixnum?]
@defproc[(unsafe-fxremainder [a fixnum?][b fixnum?]) fixnum?] @defproc[(unsafe-fxremainder [a fixnum?] [b fixnum?]) fixnum?]
@defproc[(unsafe-fxmodulo [a fixnum?][b fixnum?]) fixnum?] @defproc[(unsafe-fxmodulo [a fixnum?] [b fixnum?]) fixnum?]
@defproc[(unsafe-fxabs [a fixnum?]) fixnum?] @defproc[(unsafe-fxabs [a fixnum?]) fixnum?]
)]{ )]{
For @tech{fixnums}: Like @scheme[+], @scheme[-], @scheme[*], For @tech{fixnums}: Like @scheme[+], @scheme[-], @scheme[*],
@ -53,12 +53,12 @@ For @tech{fixnums}: Like @scheme[+], @scheme[-], @scheme[*],
@deftogether[( @deftogether[(
@defproc[(unsafe-fxand [a fixnum?][b fixnum?]) fixnum?] @defproc[(unsafe-fxand [a fixnum?] [b fixnum?]) fixnum?]
@defproc[(unsafe-fxior [a fixnum?][b fixnum?]) fixnum?] @defproc[(unsafe-fxior [a fixnum?] [b fixnum?]) fixnum?]
@defproc[(unsafe-fxxor [a fixnum?][b fixnum?]) fixnum?] @defproc[(unsafe-fxxor [a fixnum?] [b fixnum?]) fixnum?]
@defproc[(unsafe-fxnot [a fixnum?]) fixnum?] @defproc[(unsafe-fxnot [a fixnum?]) fixnum?]
@defproc[(unsafe-fxlshift [a fixnum?][b fixnum?]) fixnum?] @defproc[(unsafe-fxlshift [a fixnum?] [b fixnum?]) fixnum?]
@defproc[(unsafe-fxrshift [a fixnum?][b fixnum?]) fixnum?] @defproc[(unsafe-fxrshift [a fixnum?] [b fixnum?]) fixnum?]
)]{ )]{
For @tech{fixnums}: Like @scheme[bitwise-and], @scheme[bitwise-ior], 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[( @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-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-fxmin [a fixnum?] [b fixnum?]) fixnum?]
@defproc[(unsafe-fxmax [a fixnum?][b fixnum?]) fixnum?] @defproc[(unsafe-fxmax [a fixnum?] [b fixnum?]) fixnum?]
)]{ )]{
For @tech{fixnums}: Like @scheme[=], @scheme[<], @scheme[>], For @tech{fixnums}: Like @scheme[=], @scheme[<], @scheme[>],
@ -96,10 +96,10 @@ Unchecked version of @scheme[->fl].
@deftogether[( @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?] @defproc[(unsafe-flabs [a inexact-real?]) inexact-real?]
)]{ )]{
@ -108,11 +108,11 @@ For @tech{flonums}: Unchecked versions of @scheme[fl+], @scheme[fl-],
@deftogether[( @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-flmin [a inexact-real?]) inexact-real?]
@defproc[(unsafe-flmax [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[( @deftogether[(
@defproc[(unsafe-unbox [v (and/c box? (not/c chaperone?))]) any/c] @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-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!].} Unsafe versions of @scheme[unbox] and @scheme[set-box!].}
@ -181,11 +181,11 @@ Unsafe versions of @scheme[unbox] and @scheme[set-box!].}
@deftogether[( @deftogether[(
@defproc[(unsafe-vector-length [v (and/c vector? (not/c chaperone?))]) fixnum?] @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-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-set! [v (and/c vector? (not/c chaperone?))] [k fixnum?] [val any/c]) void?]
@defproc[(unsafe-vector*-length [v vector?]) fixnum?] @defproc[(unsafe-vector*-length [v vector?]) fixnum?]
@defproc[(unsafe-vector*-ref [v vector?][k fixnum?]) any/c] @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*-set! [v vector?] [k fixnum?] [val any/c]) void?]
)]{ )]{
Unsafe versions of @scheme[vector-length], @scheme[vector-ref], and Unsafe versions of @scheme[vector-length], @scheme[vector-ref], and
@ -196,9 +196,9 @@ fixnum).}
@deftogether[( @deftogether[(
@defproc[(unsafe-string-length [str string?]) fixnum?] @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)))] (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 Unsafe versions of @scheme[string-length], @scheme[string-ref], and
@ -210,8 +210,8 @@ always returns a fixnum).}
@deftogether[( @deftogether[(
@defproc[(unsafe-bytes-length [bstr bytes?]) fixnum?] @defproc[(unsafe-bytes-length [bstr bytes?]) fixnum?]
@defproc[(unsafe-bytes-ref [bstr bytes?][k fixnum?]) byte?] @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-set! [bstr (and/c bytes? (not/c immutable?))] [k fixnum?] [b byte?]) void?]
)]{ )]{
Unsafe versions of @scheme[bytes-length], @scheme[bytes-ref], and Unsafe versions of @scheme[bytes-length], @scheme[bytes-ref], and
@ -222,8 +222,8 @@ fixnum).}
@deftogether[( @deftogether[(
@defproc[(unsafe-flvector-length [v flvector?]) fixnum?] @defproc[(unsafe-flvector-length [v flvector?]) fixnum?]
@defproc[(unsafe-flvector-ref [v flvector?][k fixnum?]) any/c] @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-set! [v flvector?] [k fixnum?] [x inexact-real?]) void?]
)]{ )]{
Unsafe versions of @scheme[flvector-length], @scheme[flvector-ref], and Unsafe versions of @scheme[flvector-length], @scheme[flvector-ref], and
@ -233,8 +233,8 @@ fixnum).}
@deftogether[( @deftogether[(
@defproc[(unsafe-f64vector-ref [vec f64vector?][k fixnum?]) inexact-real?] @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-set! [vec f64vector?] [k fixnum?] [n inexact-real?]) void?]
)]{ )]{
Unsafe versions of @scheme[f64vector-ref] and Unsafe versions of @scheme[f64vector-ref] and
@ -242,10 +242,10 @@ Unsafe versions of @scheme[f64vector-ref] and
@deftogether[( @deftogether[(
@defproc[(unsafe-struct-ref [v (not/c chaperone?)][k fixnum?]) any/c] @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-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*-ref [v any/c] [k fixnum?]) any/c]
@defproc[(unsafe-struct*-set! [v any/c][k fixnum?][val any/c]) void?] @defproc[(unsafe-struct*-set! [v any/c] [k fixnum?] [val any/c]) void?]
)]{ )]{
Unsafe field access and update for an instance of a structure Unsafe field access and update for an instance of a structure

View File

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

View File

@ -1015,7 +1015,7 @@ whether the resulting information originated from an external source
(i.e., a different document).} (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?]{ void?]{
Like @racket[resolve-get], but a shared @racket[dep-key] groups Like @racket[resolve-get], but a shared @racket[dep-key] groups

View File

@ -118,7 +118,7 @@ coerced to one.
@deftogether[( @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? [v any/c]) boolean?]
@defproc[(styled-paragraph-style [p paragraph?]) style?] @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[styled-itemization-style] is an alias for
@racket[itemization-style].} @racket[itemization-style].}
@defproc[(make-blockquote [style any/c][blocks (listof block?)]) @defproc[(make-blockquote [style any/c] [blocks (listof block?)])
nested-flow?]{ nested-flow?]{
@compat[] Like @racket[make-nested-flow], but @racket[style] is @compat[] Like @racket[make-nested-flow], but @racket[style] is
@ -199,14 +199,14 @@ formats to the current one.}
@deftogether[( @deftogether[(
@defproc[(make-element [style any/c] [content list?]) element?] @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-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-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-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-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-redirect-target-element [style any/c] [content list?] [tag tag?]
[alt-path path-string?] [alt-anchor string?]) redirect-target-element?] [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-link-element [style any/c] [content list?] [tag tag?]) link-element?]
@defproc[(make-index-element [style any/c] [content list?][tag tag?] @defproc[(make-index-element [style any/c] [content list?] [tag tag?]
[tag tag?] [plain-seq (and/c pair? (listof string?))] [tag tag?] [plain-seq (and/c pair? (listof string?))]
[entry-seq list?] [desc any/c]) index-element?] [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.} particular.}
@defproc*[([(blank [size real? 0]) pict?] @defproc*[([(blank [size real? 0]) pict?]
[(blank [w real?][h real?]) pict?] [(blank [w real?] [h real?]) pict?]
[(blank [w real?][a real?][d 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?] [a real?] [d real?]) pict?])]{
Creates a pict that draws nothing. The one-argument case supplies a 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 value sued for both the width and height. In the one- and two-argument