change reference and some other docs to use #f instead of false/c and or/c insteda of one-of/c

svn: r12023
This commit is contained in:
Matthew Flatt 2008-10-13 19:45:37 +00:00
parent 26130818f3
commit 077e5a4666
55 changed files with 503 additions and 522 deletions

View File

@ -22,8 +22,8 @@ Returns @scheme[#t] if @scheme[v] is the result of @scheme[ffi-lib],
@declare-exporting[scribblings/foreign/unsafe-foreign] @declare-exporting[scribblings/foreign/unsafe-foreign]
@defproc[(ffi-lib [path (or/c path-string? false/c)] @defproc[(ffi-lib [path (or/c path-string? #f)]
[version (or/c string? (listof string?) false/c) #f]) any]{ [version (or/c string? (listof string?) #f) #f]) any]{
Returns an foreign-library value. If @scheme[path] is a path, the Returns an foreign-library value. If @scheme[path] is a path, the
result represents the foreign library, which is opened in an result represents the foreign library, which is opened in an
@ -63,9 +63,9 @@ relative path (containing slashes, e.g., @filepath{./foo.so}).}
@defproc[(get-ffi-obj [objname (or/c string? bytes? symbol?)] @defproc[(get-ffi-obj [objname (or/c string? bytes? symbol?)]
[lib (or/c ffi-lib? path-string? false/c)] [lib (or/c ffi-lib? path-string? #f)]
[type ctype?] [type ctype?]
[failure-thunk (or/c (-> any) false/c) #f]) [failure-thunk (or/c (-> any) #f) #f])
any]{ any]{
Looks for the given object name @scheme[objname] in the given Looks for the given object name @scheme[objname] in the given
@ -96,7 +96,7 @@ raise an exception.}
@defproc[(set-ffi-obj! [objname (or/c string? bytes? symbol?)] @defproc[(set-ffi-obj! [objname (or/c string? bytes? symbol?)]
[lib (or/c ffi-lib? path-string? false/c)] [lib (or/c ffi-lib? path-string? #f)]
[type ctype?] [type ctype?]
[new any/c]) [new any/c])
void?]{ void?]{
@ -109,7 +109,7 @@ interface, including Scheme callbacks.}
@defproc[(make-c-parameter [objname (or/c string? bytes? symbol?)] @defproc[(make-c-parameter [objname (or/c string? bytes? symbol?)]
[lib (or/c ffi-lib? path-string? false/c)] [lib (or/c ffi-lib? path-string? #f)]
[type ctype?]) [type ctype?])
(and/c (-> any) (and/c (-> any)
(any/c -> void?))]{ (any/c -> void?))]{
@ -134,8 +134,8 @@ actually redirected through a parameter-like procedure created by
binding and for the foreign object's name.} binding and for the foreign object's name.}
@defproc[(ffi-obj-ref [objname (or/c string? bytes? symbol?)] @defproc[(ffi-obj-ref [objname (or/c string? bytes? symbol?)]
[lib (or/c ffi-lib? path-string? false/c)] [lib (or/c ffi-lib? path-string? #f)]
[failure-thunk (or/c (-> any) false/c) #f]) [failure-thunk (or/c (-> any) #f) #f])
any]{ any]{
Returns a pointer object for the specified foreign object. This Returns a pointer object for the specified foreign object. This

View File

@ -16,8 +16,8 @@ along with conversion functions to and from the existing types.
@section{Type Constructors} @section{Type Constructors}
@defproc[(make-ctype [type ctype?] @defproc[(make-ctype [type ctype?]
[scheme-to-c (or/c false/c (any/c . -> . any))] [scheme-to-c (or/c #f (any/c . -> . any))]
[c-to-scheme (or/c false/c (any/c . -> . any))]) [c-to-scheme (or/c #f (any/c . -> . any))])
ctype?]{ ctype?]{
Creates a new @tech{C type} value, with the given conversions Creates a new @tech{C type} value, with the given conversions
@ -267,9 +267,8 @@ Otherwise, @scheme[_cprocedure] should be used (it is based on
@defproc[(_cprocedure [input-types (list ctype?)] @defproc[(_cprocedure [input-types (list ctype?)]
[output-type ctype?] [output-type ctype?]
[#:abi abi (or/c symbol/c false/c) #f] [#:abi abi (or/c symbol/c #f) #f]
[#:wrapper wrapper (or/c false/c [#:wrapper wrapper (or/c #f (procedure? . -> . procedure?))
(procedure? . -> . procedure?))
#f] #f]
[#:keep keep (or/c boolean? box? (any/c . -> . any/c)) [#:keep keep (or/c boolean? box? (any/c . -> . any/c))
#t]) #t])

View File

@ -16,7 +16,7 @@ it exports the following procedures. If you find any of these useful,
please let us know. please let us know.
@defproc[(ffi-obj [objname (or/c string? bytes? symbol?)] @defproc[(ffi-obj [objname (or/c string? bytes? symbol?)]
[lib (or/c ffi-lib? path-string? false/c)]) [lib (or/c ffi-lib? path-string? #f)])
any]{ any]{
Pulls out a foreign object from a library, returning a Scheme value Pulls out a foreign object from a library, returning a Scheme value
@ -34,7 +34,7 @@ functions that return its corresponding library object and name.
These values can also be used as C pointer objects.} These values can also be used as C pointer objects.}
@defproc*[([(ctype-basetype [type ctype?]) (or/c ctype? false/c)] @defproc*[([(ctype-basetype [type ctype?]) (or/c ctype? #f)]
[(ctype-scheme->c [type ctype?]) procedure?] [(ctype-scheme->c [type ctype?]) procedure?]
[(ctype-c->scheme [type ctype?]) procedure?])]{ [(ctype-c->scheme [type ctype?]) procedure?])]{
@ -44,7 +44,7 @@ Accessors for the components of a C type object, made by
@defproc[(ffi-call [ptr any/c] [in-types (listof ctype?)] [out-type ctype?] @defproc[(ffi-call [ptr any/c] [in-types (listof ctype?)] [out-type ctype?]
[abi (or/c symbol/c false/c) #f]) [abi (or/c symbol/c #f) #f])
any]{ any]{
The primitive mechanism that creates Scheme ``callout'' values. The The primitive mechanism that creates Scheme ``callout'' values. The
@ -61,7 +61,7 @@ especially important on Windows, where most system functions are
@defproc[(ffi-callback [proc any/c] [in-types any/c] [out-type any/c] @defproc[(ffi-callback [proc any/c] [in-types any/c] [out-type any/c]
[abi (or/c symbol/c false/c) #f]) [abi (or/c symbol/c #f) #f])
ffi-callback?]{ ffi-callback?]{
The symmetric counterpart of @scheme[ffi-call]. It receives a Scheme The symmetric counterpart of @scheme[ffi-call]. It receives a Scheme

View File

@ -22,13 +22,14 @@ the hash table is created with @scheme[make-hash] or
] ]
A literal hash table can be written as an expression by using A literal hash table can be written as an expression by using
@litchar{#hash} (for an @scheme[equal?]-based table) or @litchar{#hash} (for an @scheme[equal?]-based table),
@litchar{#hasheq} (for an @scheme[eq?]-based table). A parenthesized @litchar{#hasheq} (for an @scheme[eq?]-based table), or
sequence must immediately follow @litchar{#hash} or @litchar{#hasheq}, @litchar{#hasheqv} (for an @scheme[eqv?]-based table). A parenthesized
where each element is a sequence is a dotted key--value pair. Literal sequence must immediately follow @litchar{#hash}, @litchar{#hasheq},
hash tables are immutable, but they can be extended functionally or @litchar{#hasheqv}, where each element is a sequence is a dotted
(producing a new hash table without changing the old one) using key--value pair. Literal hash tables are immutable, but they can be
@scheme[hash-set]. extended functionally (producing a new hash table without changing the
old one) using @scheme[hash-set].
@examples[ @examples[
(define ht #hash(("apple" . red) (define ht #hash(("apple" . red)
@ -42,8 +43,9 @@ ht2
@refdetails/gory["parse-hashtable"]{the syntax of hash table literals} @refdetails/gory["parse-hashtable"]{the syntax of hash table literals}
A hash table can optionally retain its keys @defterm{weakly}, so each A non-literal hash table can optionally retain its keys
mapping is retained only so long as the key is retained elsewhere. @defterm{weakly}, so each mapping is retained only so long as the key
is retained elsewhere.
@examples[ @examples[
(define ht (make-weak-hasheq)) (define ht (make-weak-hasheq))

View File

@ -14,7 +14,7 @@ Returns @scheme[#t] if @scheme[v] is an asynchronous channel,
@scheme[#f] otherwise.} @scheme[#f] otherwise.}
@defproc[(make-async-channel [limit (or/c exact-positive-integer? false/c) #f]) @defproc[(make-async-channel [limit (or/c exact-positive-integer? #f) #f])
async-channel?]{ async-channel?]{
Returns an asynchronous channel with a buffer limit of @scheme[limit] Returns an asynchronous channel with a buffer limit of @scheme[limit]

View File

@ -199,7 +199,7 @@ string.
@section{Bytes to/from Characters, Decoding and Encoding} @section{Bytes to/from Characters, Decoding and Encoding}
@defproc[(bytes->string/utf-8 [bstr bytes?] @defproc[(bytes->string/utf-8 [bstr bytes?]
[err-char (or/c false/c char?) #f] [err-char (or/c #f char?) #f]
[start exact-nonnegative-integer? 0] [start exact-nonnegative-integer? 0]
[end exact-nonnegative-integer? (bytes-length bstr)]) [end exact-nonnegative-integer? (bytes-length bstr)])
string?]{ string?]{
@ -214,7 +214,7 @@ string.
valid UTF-8 encoding overall, then the @exnraise[exn:fail:contract].} valid UTF-8 encoding overall, then the @exnraise[exn:fail:contract].}
@defproc[(bytes->string/locale [bstr bytes?] @defproc[(bytes->string/locale [bstr bytes?]
[err-char (or/c false/c char?) #f] [err-char (or/c #f char?) #f]
[start exact-nonnegative-integer? 0] [start exact-nonnegative-integer? 0]
[end exact-nonnegative-integer? (bytes-length bstr)]) [end exact-nonnegative-integer? (bytes-length bstr)])
string?]{ string?]{
@ -227,7 +227,7 @@ string.
encoding overall, then the @exnraise[exn:fail:contract].} encoding overall, then the @exnraise[exn:fail:contract].}
@defproc[(bytes->string/latin-1 [bstr bytes?] @defproc[(bytes->string/latin-1 [bstr bytes?]
[err-char (or/c false/c char?) #f] [err-char (or/c #f char?) #f]
[start exact-nonnegative-integer? 0] [start exact-nonnegative-integer? 0]
[end exact-nonnegative-integer? (bytes-length bstr)]) [end exact-nonnegative-integer? (bytes-length bstr)])
string?]{ string?]{
@ -240,7 +240,7 @@ string.
operations.} operations.}
@defproc[(string->bytes/utf-8 [str string?] @defproc[(string->bytes/utf-8 [str string?]
[err-byte (or/c false/c byte?) #f] [err-byte (or/c #f byte?) #f]
[start exact-nonnegative-integer? 0] [start exact-nonnegative-integer? 0]
[end exact-nonnegative-integer? (string-length str)]) [end exact-nonnegative-integer? (string-length str)])
bytes?]{ bytes?]{
@ -250,7 +250,7 @@ string.
the other operations.} the other operations.}
@defproc[(string->bytes/locale [str string?] @defproc[(string->bytes/locale [str string?]
[err-byte (or/c false/c byte?) #f] [err-byte (or/c #f byte?) #f]
[start exact-nonnegative-integer? 0] [start exact-nonnegative-integer? 0]
[end exact-nonnegative-integer? (string-length str)]) [end exact-nonnegative-integer? (string-length str)])
bytes?]{ bytes?]{
@ -263,7 +263,7 @@ string.
then the @exnraise[exn:fail:contract].} then the @exnraise[exn:fail:contract].}
@defproc[(string->bytes/latin-1 [str string?] @defproc[(string->bytes/latin-1 [str string?]
[err-byte (or/c false/c byte?) #f] [err-byte (or/c #f byte?) #f]
[start exact-nonnegative-integer? 0] [start exact-nonnegative-integer? 0]
[end exact-nonnegative-integer? (string-length str)]) [end exact-nonnegative-integer? (string-length str)])
bytes?]{ bytes?]{
@ -286,7 +286,7 @@ string.
generating the encoded bytes.} generating the encoded bytes.}
@defproc[(bytes-utf-8-length [bstr bytes?] @defproc[(bytes-utf-8-length [bstr bytes?]
[err-char (or/c false/c char?) #f] [err-char (or/c #f char?) #f]
[start exact-nonnegative-integer? 0] [start exact-nonnegative-integer? 0]
[end exact-nonnegative-integer? (bytes-length bstr)]) [end exact-nonnegative-integer? (bytes-length bstr)])
exact-nonnegative-integer?]{ exact-nonnegative-integer?]{
@ -299,7 +299,7 @@ string.
@defproc[(bytes-utf-8-ref [bstr bytes?] @defproc[(bytes-utf-8-ref [bstr bytes?]
[skip exact-nonnegative-integer? 0] [skip exact-nonnegative-integer? 0]
[err-char (or/c false/c char?) #f] [err-char (or/c #f char?) #f]
[start exact-nonnegative-integer? 0] [start exact-nonnegative-integer? 0]
[end exact-nonnegative-integer? (bytes-length bstr)]) [end exact-nonnegative-integer? (bytes-length bstr)])
char?]{ char?]{
@ -314,7 +314,7 @@ string.
@defproc[(bytes-utf-8-index [bstr bytes?] @defproc[(bytes-utf-8-index [bstr bytes?]
[skip exact-nonnegative-integer? 0] [skip exact-nonnegative-integer? 0]
[err-char (or/c false/c char?) #f] [err-char (or/c #f char?) #f]
[start exact-nonnegative-integer? 0] [start exact-nonnegative-integer? 0]
[end exact-nonnegative-integer? (bytes-length bstr)]) [end exact-nonnegative-integer? (bytes-length bstr)])
exact-nonnegative-integer?]{ exact-nonnegative-integer?]{
@ -425,14 +425,14 @@ Closes the given converter, so that it can no longer be used with
[src-bstr bytes?] [src-bstr bytes?]
[src-start-pos exact-nonnegative-integer? 0] [src-start-pos exact-nonnegative-integer? 0]
[src-end-pos exact-nonnegative-integer? (bytes-length src-bstr)] [src-end-pos exact-nonnegative-integer? (bytes-length src-bstr)]
[dest-bstr (or/c bytes? false/c) #f] [dest-bstr (or/c bytes? #f) #f]
[dest-start-pos exact-nonnegative-integer? 0] [dest-start-pos exact-nonnegative-integer? 0]
[dest-end-pos (or/c exact-nonnegative-integer? false/c) [dest-end-pos (or/c exact-nonnegative-integer? #f)
(and dest-bstr (and dest-bstr
(bytes-length dest-bstr))]) (bytes-length dest-bstr))])
(values (or/c bytes? exact-nonnegative-integer?) (values (or/c bytes? exact-nonnegative-integer?)
exact-nonnegative-integer? exact-nonnegative-integer?
(one-of 'complete 'continues 'aborts 'error))]{ (or/c 'complete 'continues 'aborts 'error))]{
Converts the bytes from @scheme[src-start-pos] to @scheme[src-end-pos] Converts the bytes from @scheme[src-start-pos] to @scheme[src-end-pos]
in @scheme[src-bstr]. in @scheme[src-bstr].
@ -498,13 +498,13 @@ sequence and reset the converter, use @scheme[bytes-convert-end].}
@defproc[(bytes-convert-end [converter bytes-converter?] @defproc[(bytes-convert-end [converter bytes-converter?]
[dest-bstr (or/c bytes? false/c) #f] [dest-bstr (or/c bytes? #f) #f]
[dest-start-pos exact-nonnegative-integer? 0] [dest-start-pos exact-nonnegative-integer? 0]
[dest-end-pos (or/c exact-nonnegative-integer? false/c) [dest-end-pos (or/c exact-nonnegative-integer? #f)
(and dest-bstr (and dest-bstr
(bytes-length dest-bstr))]) (bytes-length dest-bstr))])
(values (or/c bytes? exact-nonnegative-integer?) (values (or/c bytes? exact-nonnegative-integer?)
(one-of 'complete 'continues))]{ (or/c 'complete 'continues))]{
Like @scheme[bytes-convert], but instead of converting bytes, this Like @scheme[bytes-convert], but instead of converting bytes, this
procedure generates an ending sequence for the conversion (sometimes procedure generates an ending sequence for the conversion (sometimes

View File

@ -1661,7 +1661,7 @@ not including fields whose names are local (i.e., declared with
@scheme[define-local-member-names]).} @scheme[define-local-member-names]).}
@defproc[(object-info [object any/c]) (values (or/c class? false/c) boolean?)]{ @defproc[(object-info [object any/c]) (values (or/c class? #f) boolean?)]{
Returns two values, analogous to the return Returns two values, analogous to the return
values of @scheme[struct-info]: values of @scheme[struct-info]:
@ -1685,7 +1685,7 @@ K%
(listof symbol?) (listof symbol?)
(any/c exact-nonnegative-integer? . -> . any/c) (any/c exact-nonnegative-integer? . -> . any/c)
(any/c exact-nonnegative-integer? any/c . -> . any/c) (any/c exact-nonnegative-integer? any/c . -> . any/c)
(or/c class? false/c) (or/c class? #f)
boolean?)]{ boolean?)]{
Returns seven values, analogous to the return Returns seven values, analogous to the return

View File

@ -101,7 +101,7 @@ only when the marks are for the same continuation frame in
elements to indicate the lack of a value.} elements to indicate the lack of a value.}
@defproc[(continuation-mark-set-first @defproc[(continuation-mark-set-first
[mark-set (or/c continuation-mark-set? false/c)] [mark-set (or/c continuation-mark-set? #f)]
[key-v any/c] [key-v any/c]
[prompt-tag prompt-tag? (default-continuation-prompt-tag)]) [prompt-tag prompt-tag? (default-continuation-prompt-tag)])
any]{ any]{

View File

@ -45,7 +45,7 @@ between the application and the current continuation.
@defproc[(call-with-continuation-prompt @defproc[(call-with-continuation-prompt
[thunk (-> any)] [thunk (-> any)]
[prompt-tag continuation-prompt-tag? (default-continuation-prompt-tag)] [prompt-tag continuation-prompt-tag? (default-continuation-prompt-tag)]
[handler (or/c procedure? false/c) #f]) [handler (or/c procedure? #f) #f])
any]{ any]{
Calls @scheme[thunk] with the current continuation extended by a Calls @scheme[thunk] with the current continuation extended by a

View File

@ -11,34 +11,34 @@ written.
@defproc[(make-input-port [name any/c] @defproc[(make-input-port [name any/c]
[read-in (bytes? [read-in (bytes?
. -> . (one-of/c exact-nonnegative-integer? . -> . (or/c exact-nonnegative-integer?
eof-object? eof-object?
procedure? procedure?
evt?))] evt?))]
[peek (bytes? exact-nonnegative-integer? (or/c evt? false/c) [peek (bytes? exact-nonnegative-integer? (or/c evt? #f)
. -> . (one-of/c exact-nonnegative-integer? . -> . (or/c exact-nonnegative-integer?
eof-object? eof-object?
procedure? procedure?
evt? evt?
false/c))] #f))]
[close (-> any)] [close (-> any)]
[get-progress-evt (or/c (-> evt?) false/c) #f] [get-progress-evt (or/c (-> evt?) #f) #f]
[commit (or/c (exact-positive-integer? evt? evt? . -> . any) [commit (or/c (exact-positive-integer? evt? evt? . -> . any)
false/c) #f)
#f] #f]
[get-location (or/c [get-location (or/c
(() (()
. ->* . . ->* .
((or/c exact-positive-integer? false/c) ((or/c exact-positive-integer? #f)
(or/c exact-nonnegative-integer? false/c) (or/c exact-nonnegative-integer? #f)
(or/c exact-positive-integer? false/c))) (or/c exact-positive-integer? #f)))
false/c) #f)
#f] #f]
[count-lines! (-> any) void] [count-lines! (-> any) void]
[init-position exact-positive-integer? 1] [init-position exact-positive-integer? 1]
[buffer-mode (or/c (case-> ((one-of/c 'block 'none) . -> . any) [buffer-mode (or/c (case-> ((or/c 'block 'none) . -> . any)
(-> (one-of/c 'block 'none #f))) (-> (or/c 'block 'none #f)))
false/c) #f)
#f]) #f])
input-port?]{ input-port?]{
@ -659,7 +659,7 @@ s
boolean? boolean?
. -> . . -> .
(or/c exact-nonnegative-integer? (or/c exact-nonnegative-integer?
false/c #f
evt?))] evt?))]
[close (-> any)] [close (-> any)]
[write-out-special (or/c (any/c boolean? boolean? [write-out-special (or/c (any/c boolean? boolean?
@ -667,33 +667,33 @@ s
(or/c any/c (or/c any/c
#f #f
evt?)) evt?))
false/c) #f)
#f] #f]
[get-write-evt (or/c [get-write-evt (or/c
(bytes? exact-nonnegative-integer? (bytes? exact-nonnegative-integer?
exact-nonnegative-integer? exact-nonnegative-integer?
. -> . . -> .
evt?) evt?)
false/c) #f)
#f] #f]
[get-write-special-evt (or/c [get-write-special-evt (or/c
(any/c . -> . evt?) (any/c . -> . evt?)
false/c) #f)
#f] #f]
[get-location (or/c [get-location (or/c
(() (()
. ->* . . ->* .
((or/c exact-positive-integer? false/c) ((or/c exact-positive-integer? #f)
(or/c exact-nonnegative-integer? false/c) (or/c exact-nonnegative-integer? #f)
(or/c exact-positive-integer? false/c))) (or/c exact-positive-integer? #f)))
false/c) #f)
#f] #f]
[count-lines! (-> any) void] [count-lines! (-> any) void]
[init-position exact-positive-integer? 1] [init-position exact-positive-integer? 1]
[buffer-mode (or/c (case-> [buffer-mode (or/c (case->
((one-of/c 'block 'line 'none) . -> . any) ((or/c 'block 'line 'none) . -> . any)
(-> (one-of/c 'block 'line 'none #f))) (-> (or/c 'block 'line 'none #f)))
false/c)]) #f)])
output-port?]{ output-port?]{
Creates an output port, which is immediately open for Creates an output port, which is immediately open for

View File

@ -75,7 +75,7 @@ to @scheme[#f] makes locale-sensitive operations locale-insensitive,
which means using the Unicode mapping for case operations and using which means using the Unicode mapping for case operations and using
UTF-8 for encoding. UTF-8 for encoding.
@defparam[current-locale locale (or/c string? false/c)]{ @defparam[current-locale locale (or/c string? #f)]{
A parameter that determines the current @tech{locale} for A parameter that determines the current @tech{locale} for
procedures such as @scheme[string-locale-ci=?]. procedures such as @scheme[string-locale-ci=?].

View File

@ -74,7 +74,7 @@ and its lexical context is not enriched before it is passed to the
@tech{evaluation handler}.} @tech{evaluation handler}.}
@defparam[current-load proc (path? (or/c symbol? false/c) . -> . any)]{ @defparam[current-load proc (path? (or/c symbol? #f) . -> . any)]{
A parameter that determines the current @deftech{load handler} to load A parameter that determines the current @deftech{load handler} to load
top-level forms from a file. The @tech{load handler} is called by top-level forms from a file. The @tech{load handler} is called by
@ -175,7 +175,7 @@ Like @scheme[load], but @scheme[load/cd] sets both
handler}.} handler}.}
@defparam[current-load-extension proc (path? (or/c symbol? false/c) . -> . any)]{ @defparam[current-load-extension proc (path? (or/c symbol? #f) . -> . any)]{
A parameter that determines a @deftech{extension-load handler}, which is A parameter that determines a @deftech{extension-load handler}, which is
called by @scheme[load-extension] and the default @tech{compiled-load called by @scheme[load-extension] and the default @tech{compiled-load
@ -203,7 +203,7 @@ Like @scheme[load-exension], but resolves @scheme[file] using
@scheme[current-load-relative-directory] like @scheme[load-relative].} @scheme[current-load-relative-directory] like @scheme[load-relative].}
@defparam[current-load/use-compiled proc (path? (or/c symbol? false/c) . -> . any)]{ @defparam[current-load/use-compiled proc (path? (or/c symbol? #f) . -> . any)]{
A parameter that determines the current @deftech{compiled-load A parameter that determines the current @deftech{compiled-load
handler} to load from a file that may have a compiled form. The handler} to load from a file that may have a compiled form. The

View File

@ -204,7 +204,7 @@ pseudo-randomly for the result; the
random-number generator that controls this choice.} random-number generator that controls this choice.}
@defproc[(sync/timeout [timeout-secs (or/c nonnegative-number? false/c)] @defproc[(sync/timeout [timeout-secs (or/c nonnegative-number? #f)]
[evt evt?] ...+) [evt evt?] ...+)
any]{ any]{
@ -228,7 +228,7 @@ either all @scheme[evt]s remain unchosen or the @scheme[exn:break]
exception is raised, but not both.} exception is raised, but not both.}
@defproc[(sync/timeout/enable-break [timeout-secs (or/c nonnegative-number? false/c)] @defproc[(sync/timeout/enable-break [timeout-secs (or/c nonnegative-number? #f)]
[evt evt?] ...+) [evt evt?] ...+)
any]{ any]{

View File

@ -135,7 +135,7 @@ conversion handler; see @scheme[error-value->string-handler]); also,
the number of supplied @scheme[arg-v]s is explicitly mentioned in the the number of supplied @scheme[arg-v]s is explicitly mentioned in the
message.} message.}
@defproc[(raise-syntax-error [name (or/c symbol? false/c)] @defproc[(raise-syntax-error [name (or/c symbol? #f)]
[message string?] [message string?]
[expr any/c #f] [expr any/c #f]
[sub-expr any/c #f]) [sub-expr any/c #f])
@ -526,10 +526,10 @@ Returns the @scheme[srcloc]-getting procedure associated with @scheme[v].}
@defstruct[srcloc ([source any/c] @defstruct[srcloc ([source any/c]
[line (or/c exact-positive-integer? false/c)] [line (or/c exact-positive-integer? #f)]
[column (or/c exact-nonnegative-integer? false/c)] [column (or/c exact-nonnegative-integer? #f)]
[position (or/c exact-positive-integer? false/c)] [position (or/c exact-positive-integer? #f)]
[span (or/c exact-nonnegative-integer? false/c)]) [span (or/c exact-nonnegative-integer? #f)])
#:inspector #f]{ #:inspector #f]{
The fields of an @scheme[srcloc] instance are as follows: The fields of an @scheme[srcloc] instance are as follows:

View File

@ -14,7 +14,7 @@ the management of the current custodian (see
@secref["custodians"]). @secref["custodians"]).
@defproc[(open-input-file [path path-string?] @defproc[(open-input-file [path path-string?]
[#:mode mode-flag (one-of/c 'binary 'text) 'binary]) [#:mode mode-flag (or/c 'binary 'text) 'binary])
input-port?]{ input-port?]{
Opens the file specified by @scheme[path] for input. The Opens the file specified by @scheme[path] for input. The
@ -62,8 +62,8 @@ A @tech{path} value that is the @tech{cleanse}d version of
@scheme[path] is used as the name of the opened port.} @scheme[path] is used as the name of the opened port.}
@defproc[(open-output-file [path path-string?] @defproc[(open-output-file [path path-string?]
[#:mode mode-flag (one-of/c 'binary 'text) 'binary] [#:mode mode-flag (or/c 'binary 'text) 'binary]
[#:exists exists-flag (one-of/c 'error 'append 'update 'can-update [#:exists exists-flag (or/c 'error 'append 'update 'can-update
'replace 'truncate 'replace 'truncate
'must-truncate 'truncate/replace) 'error]) 'must-truncate 'truncate/replace) 'error])
output-port?]{ output-port?]{
@ -142,8 +142,8 @@ A @tech{path} value that is the @tech{cleanse}d version of
@scheme[path] is used as the name of the opened port.} @scheme[path] is used as the name of the opened port.}
@defproc[(open-input-output-file [path path-string?] @defproc[(open-input-output-file [path path-string?]
[#:mode mode-flag (one-of/c 'binary 'text) 'binary] [#:mode mode-flag (or/c 'binary 'text) 'binary]
[#:exists exists-flag (one-of/c 'error 'append 'update [#:exists exists-flag (or/c 'error 'append 'update
'replace 'truncate 'truncate/replace) 'error]) 'replace 'truncate 'truncate/replace) 'error])
(values input-port? output-port?)]{ (values input-port? output-port?)]{
@ -160,7 +160,7 @@ to avoid confusion.}
@defproc[(call-with-input-file [path path-string?] @defproc[(call-with-input-file [path path-string?]
[proc (input-port? . -> . any)] [proc (input-port? . -> . any)]
[#:mode mode-flag (one-of/c 'binary 'text) 'binary]) [#:mode mode-flag (or/c 'binary 'text) 'binary])
any]{ any]{
Calls @scheme[open-input-port] with the @scheme[path] and Calls @scheme[open-input-port] with the @scheme[path] and
@scheme[mode-flag] arguments, and passes the resulting port @scheme[mode-flag] arguments, and passes the resulting port
@ -170,8 +170,8 @@ when @scheme[thunk] return.}
@defproc[(call-with-output-file [path path-string?] @defproc[(call-with-output-file [path path-string?]
[proc (output-port? . -> . any)] [proc (output-port? . -> . any)]
[#:mode mode-flag (one-of/c 'binary 'text) 'binary] [#:mode mode-flag (or/c 'binary 'text) 'binary]
[#:exists exists-flag (one-of/c 'error 'append 'update [#:exists exists-flag (or/c 'error 'append 'update
'replace 'truncate 'truncate/replace) 'error]) 'replace 'truncate 'truncate/replace) 'error])
any]{ any]{
Analogous to @scheme[call-with-input-file], but passing @scheme[path], Analogous to @scheme[call-with-input-file], but passing @scheme[path],
@ -180,7 +180,7 @@ Analogous to @scheme[call-with-input-file], but passing @scheme[path],
@defproc[(call-with-input-file* [path path-string?] @defproc[(call-with-input-file* [path path-string?]
[proc (input-port? . -> . any)] [proc (input-port? . -> . any)]
[#:mode mode-flag (one-of/c 'binary 'text) 'binary]) [#:mode mode-flag (or/c 'binary 'text) 'binary])
any]{ any]{
Like @scheme[call-with-input-file], but the newly opened port is Like @scheme[call-with-input-file], but the newly opened port is
closed whenever control escapes the the dynamic extent of the closed whenever control escapes the the dynamic extent of the
@ -189,8 +189,8 @@ return, a continuation application, or a prompt-based abort.}
@defproc[(call-with-output-file* [path path-string?] @defproc[(call-with-output-file* [path path-string?]
[proc (output-port? . -> . any)] [proc (output-port? . -> . any)]
[#:mode mode-flag (one-of/c 'binary 'text) 'binary] [#:mode mode-flag (or/c 'binary 'text) 'binary]
[#:exists exists-flag (one-of/c 'error 'append 'update [#:exists exists-flag (or/c 'error 'append 'update
'replace 'truncate 'truncate/replace) 'error]) 'replace 'truncate 'truncate/replace) 'error])
any]{ any]{
Like @scheme[call-with-output-file], but the newly opened port is Like @scheme[call-with-output-file], but the newly opened port is
@ -200,7 +200,7 @@ return, a continuation application, or a prompt-based abort.}
@defproc[(with-input-from-file [path path-string?] @defproc[(with-input-from-file [path path-string?]
[thunk (-> any)] [thunk (-> any)]
[#:mode mode-flag (one-of/c 'binary 'text) 'binary]) [#:mode mode-flag (or/c 'binary 'text) 'binary])
any]{ any]{
Like @scheme[call-with-input-file*], but instead of passing the newly Like @scheme[call-with-input-file*], but instead of passing the newly
opened port to the given procedure argument, the port is installed as opened port to the given procedure argument, the port is installed as
@ -209,8 +209,8 @@ the current input port (see @scheme[current-input-port]) using
@defproc[(with-output-to-file [path path-string?] @defproc[(with-output-to-file [path path-string?]
[thunk (-> any)] [thunk (-> any)]
[#:mode mode-flag (one-of/c 'binary 'text) 'binary] [#:mode mode-flag (or/c 'binary 'text) 'binary]
[#:exists exists-flag (one-of/c 'error 'append 'update [#:exists exists-flag (or/c 'error 'append 'update
'replace 'truncate 'truncate/replace) 'error]) 'replace 'truncate 'truncate/replace) 'error])
any]{ any]{
Like @scheme[call-with-output-file*], but instead of passing the newly Like @scheme[call-with-output-file*], but instead of passing the newly

View File

@ -153,7 +153,7 @@ included in the returned list.}
@defproc[(find-executable-path [program-sub path-string?][related-sub path-string?][deepest? any/c #f]) @defproc[(find-executable-path [program-sub path-string?][related-sub path-string?][deepest? any/c #f])
(or/c path? false/c)]{ (or/c path? #f)]{
Finds a path for the executable @scheme[program-sub], returning Finds a path for the executable @scheme[program-sub], returning
@scheme[#f] if the path cannot be found. @scheme[#f] if the path cannot be found.
@ -256,7 +256,7 @@ existing @scheme[new].}
@defproc[(file-or-directory-modify-seconds [path path-string?] @defproc[(file-or-directory-modify-seconds [path path-string?]
[secs-n (or/c exact-integer? false/c) #f] [secs-n (or/c exact-integer? #f) #f]
[fail-thunk (-> any) (lambda () (raise (make-exn:fail:filesystem ....)))]) [fail-thunk (-> any) (lambda () (raise (make-exn:fail:filesystem ....)))])
any]{ any]{
@ -556,7 +556,7 @@ deleted. If @scheme[path] is a directory, then
directory in @scheme[path] before the directory is deleted.} directory in @scheme[path] before the directory is deleted.}
@defproc[(find-files [predicate (path? . -> . any/c)] @defproc[(find-files [predicate (path? . -> . any/c)]
[start-path (or/c path-string? false/c) #f]) [start-path (or/c path-string? #f) #f])
(listof path?)]{ (listof path?)]{
Traverses the filesystem starting at @scheme[start-path] and creates a Traverses the filesystem starting at @scheme[start-path] and creates a
@ -604,13 +604,13 @@ directory, returns a list such that
}} }}
@defproc[(fold-files [proc (and/c (path? (one-of/c 'file 'dir 'link) any/c @defproc[(fold-files [proc (and/c (path? (or/c 'file 'dir 'link) any/c
. -> . any/c) . -> . any/c)
(or/c procedure? (or/c procedure?
((path? (one-of/c 'dir) any/c) ((path? 'dir any/c)
. -> . (values any/c any/c))))] . -> . (values any/c any/c))))]
[init-val any/c] [init-val any/c]
[start-path (or/c path-string? false/c) #f] [start-path (or/c path-string? #f) #f]
[follow-links? any/c #t]) [follow-links? any/c #t])
any]{ any]{
@ -670,8 +670,8 @@ directories as necessary.}
@defproc[(make-temporary-file [template string? "mztmp~a"] @defproc[(make-temporary-file [template string? "mztmp~a"]
[copy-from-filename (or/c path-string? false/c (one-of/c 'directory)) #f] [copy-from-filename (or/c path-string? #f 'directory) #f]
[directory (or/c path-string? false/c) #f]) [directory (or/c path-string? #f) #f])
path?]{ path?]{
Creates a new temporary file and returns a pathname string for the Creates a new temporary file and returns a pathname string for the
@ -705,7 +705,7 @@ needed.}
@defproc[(get-preference [name symbol?] @defproc[(get-preference [name symbol?]
[failure-thunk (-> any) (lambda () #f)] [failure-thunk (-> any) (lambda () #f)]
[flush-mode any/c 'timestamp] [flush-mode any/c 'timestamp]
[filename (or/c string-path? false/c) #f]) [filename (or/c string-path? #f) #f])
any]{ any]{
Extracts a preference value from the file designated by Extracts a preference value from the file designated by
@ -742,7 +742,7 @@ system, see @scheme[preferences:get].}
@defproc[(put-preferences [names (listof symbol?)] @defproc[(put-preferences [names (listof symbol?)]
[vals list?] [vals list?]
[locked-proc (path? . -> . any) (lambda (p) (error ....))] [locked-proc (path? . -> . any) (lambda (p) (error ....))]
[filename (or/c false/c path-string?) #f]) [filename (or/c #f path-string?) #f])
void?]{ void?]{
Installs a set of preference values and writes all current values to Installs a set of preference values and writes all current values to

View File

@ -259,7 +259,7 @@ above about concurrent modification.}
@defproc[(hash-iterate-first [hash hash?]) @defproc[(hash-iterate-first [hash hash?])
(or/c false/c exact-nonnegative-integer?)]{ (or/c #f exact-nonnegative-integer?)]{
Returns @scheme[#f] if @scheme[hash] contains no elements, otherwise Returns @scheme[#f] if @scheme[hash] contains no elements, otherwise
it returns an integer that is a index to the first element in the hash it returns an integer that is a index to the first element in the hash
@ -271,7 +271,7 @@ removed from @scheme[hash].}
@defproc[(hash-iterate-next [hash hash?] @defproc[(hash-iterate-next [hash hash?]
[pos exact-nonnegative-integer?]) [pos exact-nonnegative-integer?])
(or/c false/c exact-nonnegative-integer?)]{ (or/c #f exact-nonnegative-integer?)]{
Returns either an integer that is an index to the element in Returns either an integer that is an index to the element in
@scheme[hash] after the element indexed by @scheme[pos] (which is not @scheme[hash] after the element indexed by @scheme[pos] (which is not

View File

@ -68,14 +68,14 @@ Returns @scheme[#t] if @scheme[v] is a @tech{logger}, @scheme[#f]
otherwise.} otherwise.}
@defproc[(make-logger [name (or/c symbol? false/c) #f] @defproc[(make-logger [name (or/c symbol? #f) #f]
[parent (or/c logger? false/c) #f]) [parent (or/c logger? #f) #f])
logger?]{ logger?]{
Creates a new logger with an optional name and parent.} Creates a new logger with an optional name and parent.}
@defproc[(logger-name [logger logger?]) (or/c symbol? false/c)]{ @defproc[(logger-name [logger logger?]) (or/c symbol? #f)]{
Reports @scheme[logger]'s name, if any.} Reports @scheme[logger]'s name, if any.}
@ -88,7 +88,7 @@ A @tech{parameter} that determines the @tech{current logger}.}
@section{Logging Events} @section{Logging Events}
@defproc[(log-message [logger logger?] @defproc[(log-message [logger logger?]
[level (one-of/c 'fatal 'error 'warning 'info 'debug)] [level (or/c 'fatal 'error 'warning 'info 'debug)]
[message string?] [message string?]
[data any/c]) [data any/c])
void?]{ void?]{
@ -104,7 +104,7 @@ receivers.}
@defproc[(log-level? [logger logger?] @defproc[(log-level? [logger logger?]
[level (one-of/c 'fatal 'error 'warning 'info 'debug)]) [level (or/c 'fatal 'error 'warning 'info 'debug)])
boolean?]{ boolean?]{
Reports whether any @tech{log receiver} attached to @scheme[logger] or Reports whether any @tech{log receiver} attached to @scheme[logger] or
@ -158,7 +158,7 @@ Returns @scheme[#t] if @scheme[v] is a @tech{log receiver}, @scheme[#f]
otherwise.} otherwise.}
@defproc[(make-log-receiver [logger logger?] @defproc[(make-log-receiver [logger logger?]
[level (one-of/c 'fatal 'error 'warning 'info 'debug)]) [level (or/c 'fatal 'error 'warning 'info 'debug)])
log-receiver?]{ log-receiver?]{
Creates a @tech{log receiver} to receive events of importance Creates a @tech{log receiver} to receive events of importance

View File

@ -55,8 +55,8 @@ the grammar for @scheme[_module-path] for @scheme[require],
. -> . . -> .
any) any)
((or/c module-path? path?) ((or/c module-path? path?)
(or/c false/c resolved-module-path?) (or/c #f resolved-module-path?)
(or/c false/c syntax?) (or/c #f syntax?)
boolean? boolean?
. -> . . -> .
resolved-module-path?))]{ resolved-module-path?))]{
@ -128,7 +128,7 @@ tools (such as DrScheme) might call this resolver in this mode to
avoid redundant module loads.} avoid redundant module loads.}
@defparam[current-module-declare-name name (or/c resolved-module-path? false/c)]{ @defparam[current-module-declare-name name (or/c resolved-module-path? #f)]{
A parameter that determines a module name that is used when evaluating A parameter that determines a module name that is used when evaluating
a @scheme[module] declaration (when the parameter value is not a @scheme[module] declaration (when the parameter value is not
@ -204,8 +204,8 @@ resolved name can depend on the value of
@defproc[(module-path-index-split [mpi module-path-index?]) @defproc[(module-path-index-split [mpi module-path-index?])
(values (or/c module-path? false/c) (values (or/c module-path? #f)
(or/c module-path-index? resolved-module-path? false/c))]{ (or/c module-path-index? resolved-module-path? #f))]{
Returns two values: a module path, and a base @tech{module path index} Returns two values: a module path, and a base @tech{module path index}
or @scheme[#f] to which the module path is relative. or @scheme[#f] to which the module path is relative.
@ -219,8 +219,8 @@ A @scheme[#f] for the first result implies a @scheme[#f] for the
second result, and means that @scheme[mpi] represents ``self'' (see second result, and means that @scheme[mpi] represents ``self'' (see
above).} above).}
@defproc[(module-path-index-join [path (or/c module-path? false/c)] @defproc[(module-path-index-join [path (or/c module-path? #f)]
[mpi (or/c module-path-index? resolved-module-path? false/c)]) [mpi (or/c module-path-index? resolved-module-path? #f)])
module-path-index?]{ module-path-index?]{
Combines @scheme[path] and @scheme[mpi] to create a new @tech{module Combines @scheme[path] and @scheme[mpi] to create a new @tech{module
@ -242,7 +242,7 @@ the module's declared name.}
@defproc[(module-compiled-imports [compiled-module-code compiled-module-expression?]) @defproc[(module-compiled-imports [compiled-module-code compiled-module-expression?])
(listof (cons/c (or/c exact-integer? false/c) (listof (cons/c (or/c exact-integer? #f)
(listof module-path-index?)))]{ (listof module-path-index?)))]{
Takes a module declaration in compiled form and returns an association Takes a module declaration in compiled form and returns an association
@ -252,8 +252,8 @@ the module's explicit imports.}
@defproc[(module-compiled-exports [compiled-module-code compiled-module-expression?]) @defproc[(module-compiled-exports [compiled-module-code compiled-module-expression?])
(values (listof (cons/c (or/c exact-integer? false/c) list?)) (values (listof (cons/c (or/c exact-integer? #f) list?))
(listof (cons/c (or/c exact-integer? false/c) list?)))] (listof (cons/c (or/c exact-integer? #f) list?)))]
Returns two association lists mapping @tech{phase level} values (where Returns two association lists mapping @tech{phase level} values (where
@scheme[#f] corresponds to the @tech{label phase level}) to exports at @scheme[#f] corresponds to the @tech{label phase level}) to exports at
@ -267,9 +267,9 @@ Each associated list more precisely matches the contract
(listof (listof
(or/c module-path-index? (or/c module-path-index?
(list/c module-path-index? (list/c module-path-index?
(or/c exact-integer? false/c) (or/c exact-integer? #f)
symbol? symbol?
(or/c exact-integer? false/c)))))) (or/c exact-integer? #f))))))
] ]
For each element of the list, the leading symbol is the name of the For each element of the list, the leading symbol is the name of the
@ -294,7 +294,7 @@ name of the re-exported binding, and the @tech{phase level} of the
import.} import.}
@defproc[(module-compiled-language-info [compiled-module-code compiled-module-expression?]) @defproc[(module-compiled-language-info [compiled-module-code compiled-module-expression?])
(or/c false/c (vector/c module-path? symbol? any/c))]{ (or/c #f (vector/c module-path? symbol? any/c))]{
Returns information intended to reflect the ``language'' of the Returns information intended to reflect the ``language'' of the
module's implementation as originally attached to the syntax of the module's implementation as originally attached to the syntax of the
@ -316,7 +316,7 @@ See also @scheme[module->language-info].}
@;------------------------------------------------------------------------ @;------------------------------------------------------------------------
@section[#:tag "dynreq"]{Dynamic Module Access} @section[#:tag "dynreq"]{Dynamic Module Access}
@defproc[(dynamic-require [mod module-path?][provided (or/c symbol? false/c void?)]) @defproc[(dynamic-require [mod module-path?][provided (or/c symbol? #f void?)])
any]{ any]{
Dynamically instantiates the module specified by @scheme[mod] for Dynamically instantiates the module specified by @scheme[mod] for
@ -344,14 +344,14 @@ If @scheme[provided] is @|void-const|, then the module is
@defproc[(dynamic-require-for-syntax [mod module-path?] @defproc[(dynamic-require-for-syntax [mod module-path?]
[provided (or/c symbol? false/c)]) [provided (or/c symbol? #f)])
any]{ any]{
Like @scheme[dynamic-require], but in @tech{phase} 1.} Like @scheme[dynamic-require], but in @tech{phase} 1.}
@defproc[(module->language-info [mod module-path?]) @defproc[(module->language-info [mod module-path?])
(or/c false/c (vector/c module-path? symbol? any/c))]{ (or/c #f (vector/c module-path? symbol? any/c))]{
Returns information intended to reflect the ``language'' of the Returns information intended to reflect the ``language'' of the
implementation of @scheme[mod], which must be declared (but not implementation of @scheme[mod], which must be declared (but not

View File

@ -132,37 +132,37 @@ Like @scheme[for-each], but for @tech{mutable lists}.}
@defproc[(mmember [v any/c] [mlst mlist?]) @defproc[(mmember [v any/c] [mlst mlist?])
(or/c mlist? false/c)]{ (or/c mlist? #f)]{
Like @scheme[member], but for @tech{mutable lists}.} Like @scheme[member], but for @tech{mutable lists}.}
@defproc[(mmemv [v any/c] [mlst mlist?]) @defproc[(mmemv [v any/c] [mlst mlist?])
(or/c mlist? false/c)]{ (or/c mlist? #f)]{
Like @scheme[memv], but for @tech{mutable lists}.} Like @scheme[memv], but for @tech{mutable lists}.}
@defproc[(mmemq [v any/c] [mlst mlist?]) @defproc[(mmemq [v any/c] [mlst mlist?])
(or/c list? false/c)]{ (or/c list? #f)]{
Like @scheme[memq], but for @tech{mutable lists}.} Like @scheme[memq], but for @tech{mutable lists}.}
@defproc[(massoc [v any/c] [mlst (mlistof mpair?)]) @defproc[(massoc [v any/c] [mlst (mlistof mpair?)])
(or/c mpair? false/c)]{ (or/c mpair? #f)]{
Like @scheme[assoc], but for mutable lists of mutable pairs.} Like @scheme[assoc], but for mutable lists of mutable pairs.}
@defproc[(massv [v any/c] [mlst (mlistof mpair?)]) @defproc[(massv [v any/c] [mlst (mlistof mpair?)])
(or/c mpair? false/c)]{ (or/c mpair? #f)]{
Like @scheme[assv], but for mutable lists of mutable pairs.} Like @scheme[assv], but for mutable lists of mutable pairs.}
@defproc[(massq [v any/c] [mlst (mlistof mpair?)]) @defproc[(massq [v any/c] [mlst (mlistof mpair?)])
(or/c mpair? false/c)]{ (or/c mpair? #f)]{
Like @scheme[assq], but for mutable lists of mutable pairs.} Like @scheme[assq], but for mutable lists of mutable pairs.}

View File

@ -105,7 +105,7 @@ no source location or properties.}
Returns the @tech{base phase} of @scheme[namespace].} Returns the @tech{base phase} of @scheme[namespace].}
@defproc[(namespace-module-identifier [where (or/c namespace? exact-integer? false/c) @defproc[(namespace-module-identifier [where (or/c namespace? exact-integer? #f)
(current-namespace)]) (current-namespace)])
identifier?]{ identifier?]{
@ -123,7 +123,7 @@ bindings.}
@defproc[(namespace-variable-value [sym symbol?] @defproc[(namespace-variable-value [sym symbol?]
[use-mapping? any/c #t] [use-mapping? any/c #t]
[failure-thunk (or/c (-> any) false/c) #f] [failure-thunk (or/c (-> any) #f) #f]
[namespace namespace? (current-namespace)]) [namespace namespace? (current-namespace)])
any]{ any]{

View File

@ -17,7 +17,7 @@ For information about TCP in general, see @italic{TCP/IP Illustrated,
(integer-in 1 65535))] (integer-in 1 65535))]
[max-allow-wait exact-nonnegative-integer? 4] [max-allow-wait exact-nonnegative-integer? 4]
[reuse? any/c #f] [reuse? any/c #f]
[hostname (or/c string? false/c) #f]) [hostname (or/c string? #f) #f])
tcp-listener?] tcp-listener?]
Creates a ``listening'' server on the local machine at the port number Creates a ``listening'' server on the local machine at the port number
@ -64,10 +64,10 @@ If the server cannot be started by @scheme[tcp-listen], the
@defproc[(tcp-connect [hostname string?] @defproc[(tcp-connect [hostname string?]
[port-no (and/c exact-nonnegative-integer? [port-no (and/c exact-nonnegative-integer?
(integer-in 1 65535))] (integer-in 1 65535))]
[local-hostname (or/c string? false/c) #f] [local-hostname (or/c string? #f) #f]
[local-port-no (or/c (and/c exact-nonnegative-integer? [local-port-no (or/c (and/c exact-nonnegative-integer?
(integer-in 1 65535)) (integer-in 1 65535))
false/c) #f)
#f]) #f])
(values input-port? output-port?)]{ (values input-port? output-port?)]{
@ -121,10 +121,10 @@ If a connection cannot be established by @scheme[tcp-connect], the
@defproc[(tcp-connect/enable-break [hostname string?] @defproc[(tcp-connect/enable-break [hostname string?]
[port-no (and/c exact-nonnegative-integer? [port-no (and/c exact-nonnegative-integer?
(integer-in 1 65535))] (integer-in 1 65535))]
[local-hostname (or/c string? false/c) #f] [local-hostname (or/c string? #f) #f]
[local-port-no (or/c (and/c exact-nonnegative-integer? [local-port-no (or/c (and/c exact-nonnegative-integer?
(integer-in 1 65535)) (integer-in 1 65535))
false/c)]) #f)])
(values input-port? output-port?)]{ (values input-port? output-port?)]{
Like @scheme[tcp-connect], but breaking is enabled (see Like @scheme[tcp-connect], but breaking is enabled (see
@ -261,8 +261,8 @@ Returns @scheme[#t] if @scheme[v] is a port returned by
For information about UDP in general, see @italic{TCP/IP Illustrated, For information about UDP in general, see @italic{TCP/IP Illustrated,
Volume 1} by W. Richard Stevens. Volume 1} by W. Richard Stevens.
@defproc[(udp-open-socket [family-hostname (or/c string? false/c) #f] @defproc[(udp-open-socket [family-hostname (or/c string? #f) #f]
[family-port-no (or/c string? false/c) #f]) [family-port-no (or/c string? #f) #f])
udp?]{ udp?]{
Creates and returns a UDP socket to send and receive Creates and returns a UDP socket to send and receive
@ -282,7 +282,7 @@ neither @scheme[family-hostname] nor @scheme[family-port-no] is
non-@scheme[#f], then the socket's protocol family is IPv4.} non-@scheme[#f], then the socket's protocol family is IPv4.}
@defproc[(udp-bind! [udp-socket udp?] @defproc[(udp-bind! [udp-socket udp?]
[hostname-string (or/c string? false/c)] [hostname-string (or/c string? #f)]
[port-no (and/c exact-nonnegative-integer? [port-no (and/c exact-nonnegative-integer?
(integer-in 1 65535))]) (integer-in 1 65535))])
void?]{ void?]{
@ -318,10 +318,10 @@ If @scheme[udp-socket] is already bound or closed, the
@defproc[(udp-connect! [udp-socket udp?] @defproc[(udp-connect! [udp-socket udp?]
[hostname-string (or/c string? false/c)] [hostname-string (or/c string? #f)]
[port-no (or/c (and/c exact-nonnegative-integer? [port-no (or/c (and/c exact-nonnegative-integer?
(integer-in 1 65535)) (integer-in 1 65535))
false/c)]) #f)])
void?]{ void?]{
Connects the socket to the indicated remote address and port if Connects the socket to the indicated remote address and port if
@ -456,9 +456,9 @@ the length of @scheme[bstr], the @exnraise[exn:fail:contract].}
[bstr (and/c bytes? (not immutable?))] [bstr (and/c bytes? (not immutable?))]
[start-pos exact-nonnegative-integer? 0] [start-pos exact-nonnegative-integer? 0]
[end-pos exact-nonnegative-integer? (bytes-length bstr)]) [end-pos exact-nonnegative-integer? (bytes-length bstr)])
(values (or/c exact-nonnegative-integer? false/c) (values (or/c exact-nonnegative-integer? #f)
(or/c string? false/c) (or/c string? #f)
(or/c (integer-in 1 65535) false/c))]{ (or/c (integer-in 1 65535) #f))]{
Like @scheme[udp-receive!], except that it never blocks. If no Like @scheme[udp-receive!], except that it never blocks. If no
datagram is available, the three result values are all @scheme[#f].} datagram is available, the three result values are all @scheme[#f].}

View File

@ -687,7 +687,7 @@ generator.}
@section-index["numbers" "converting"] @section-index["numbers" "converting"]
@defproc[(number->string [z number?] @defproc[(number->string [z number?]
[radix (one-of/c 2 8 10 16) 10]) string?]{ [radix (or/c 2 8 10 16) 10]) string?]{
Returns a string that is the printed form of @scheme[z] Returns a string that is the printed form of @scheme[z]
in the base specific by @scheme[radix]. If @scheme[z] is inexact, in the base specific by @scheme[radix]. If @scheme[z] is inexact,
@scheme[radix] must be @scheme[10], otherwise the @scheme[radix] must be @scheme[10], otherwise the
@ -697,7 +697,7 @@ generator.}
@defproc[(string->number [s string?] [radix (integer-in 2 16) 10]) @defproc[(string->number [s string?] [radix (integer-in 2 16) 10])
(or/c number? false/c)]{ (or/c number? #f)]{
Reads and returns a number datum from @scheme[s] (see Reads and returns a number datum from @scheme[s] (see
@secref["parse-number"]), returning @scheme[#f] if @scheme[s] does not @secref["parse-number"]), returning @scheme[#f] if @scheme[s] does not
@ -750,7 +750,7 @@ least-significant eight bits, and so on.}
@defproc[(integer->integer-bytes [n exact-integer?] @defproc[(integer->integer-bytes [n exact-integer?]
[size-n (one-of/c 2 4 8)] [size-n (or/c 2 4 8)]
[signed? any/c] [signed? any/c]
[big-endian? any/c (system-big-endian?)] [big-endian? any/c (system-big-endian?)]
[dest-bstr (and/c bytes? [dest-bstr (and/c bytes?
@ -794,7 +794,7 @@ provides the least-significant eight bits, and so on.}
@defproc[(real->floating-point-bytes [x real?] @defproc[(real->floating-point-bytes [x real?]
[size-n (one-of/c 4 8)] [size-n (or/c 4 8)]
[big-endian? any/c (system-big-endian?)] [big-endian? any/c (system-big-endian?)]
[dest-bstr (and/c bytes? [dest-bstr (and/c bytes?
(not/c immutable?)) (not/c immutable?))
@ -838,7 +838,7 @@ diameter: @number->string[pi].}
Returns @scheme[(* z z)].} Returns @scheme[(* z z)].}
@defproc[(sgn [x real?]) (one-of/c 1 0 -1 1.0 0.0 -1.0)]{ @defproc[(sgn [x real?]) (or/c 1 0 -1 1.0 0.0 -1.0)]{
Returns the sign of @scheme[x] as either @math{-1}, @math{0}, or Returns the sign of @scheme[x] as either @math{-1}, @math{0}, or
@math{1}. @math{1}.

View File

@ -376,7 +376,7 @@ By default, @scheme[extract-key] is applied to two list elements for
@section{List Searching} @section{List Searching}
@defproc[(member [v any/c] [lst list?]) @defproc[(member [v any/c] [lst list?])
(or/c list? false/c)]{ (or/c list? #f)]{
Locates the first element of @scheme[lst] that is @scheme[equal?] to Locates the first element of @scheme[lst] that is @scheme[equal?] to
@scheme[v]. If such an element exists, the tail of @scheme[lst] @scheme[v]. If such an element exists, the tail of @scheme[lst]
@ -385,19 +385,19 @@ Locates the first element of @scheme[lst] that is @scheme[equal?] to
@defproc[(memv [v any/c] [lst list?]) @defproc[(memv [v any/c] [lst list?])
(or/c list? false/c)]{ (or/c list? #f)]{
Like @scheme[member], but finds an element using @scheme[eqv?].} Like @scheme[member], but finds an element using @scheme[eqv?].}
@defproc[(memq [v any/c] [lst list?]) @defproc[(memq [v any/c] [lst list?])
(or/c list? false/c)]{ (or/c list? #f)]{
Like @scheme[member], but finds an element using @scheme[eq?].} Like @scheme[member], but finds an element using @scheme[eq?].}
@defproc[(memf [proc procedure?] [lst list?]) @defproc[(memf [proc procedure?] [lst list?])
(or/c list? false/c)]{ (or/c list? #f)]{
Like @scheme[member], but finds an element using the predicate Like @scheme[member], but finds an element using the predicate
@scheme[proc]; an element is found when @scheme[proc] applied to the @scheme[proc]; an element is found when @scheme[proc] applied to the
@ -411,7 +411,7 @@ Like @scheme[memf], but returns the element or @scheme[#f]
@defproc[(assoc [v any/c] [lst (listof pair?)]) @defproc[(assoc [v any/c] [lst (listof pair?)])
(or/c pair? false/c)]{ (or/c pair? #f)]{
Locates the first element of @scheme[lst] whose @scheme[car] is Locates the first element of @scheme[lst] whose @scheme[car] is
@scheme[equal?] to @scheme[v]. If such an element exists, the pair @scheme[equal?] to @scheme[v]. If such an element exists, the pair
@ -420,19 +420,19 @@ Locates the first element of @scheme[lst] whose @scheme[car] is
@defproc[(assv [v any/c] [lst (listof pair?)]) @defproc[(assv [v any/c] [lst (listof pair?)])
(or/c pair? false/c)]{ (or/c pair? #f)]{
Like @scheme[assoc], but finds an element using @scheme[eqv?].} Like @scheme[assoc], but finds an element using @scheme[eqv?].}
@defproc[(assq [v any/c] [lst (listof pair?)]) @defproc[(assq [v any/c] [lst (listof pair?)])
(or/c pair? false/c)]{ (or/c pair? #f)]{
Like @scheme[assoc], but finds an element using @scheme[eq?].} Like @scheme[assoc], but finds an element using @scheme[eq?].}
@defproc[(assf [proc procedure?] [lst list?]) @defproc[(assf [proc procedure?] [lst list?])
(or/c list? false/c)]{ (or/c list? #f)]{
Like @scheme[assoc], but finds an element using the predicate Like @scheme[assoc], but finds an element using the predicate
@scheme[proc]; an element is found when @scheme[proc] applied to the @scheme[proc]; an element is found when @scheme[proc] applied to the

View File

@ -29,7 +29,7 @@ value originally associated with a parameter through
reachable, even if the parameter is mutated. reachable, even if the parameter is mutated.
@defproc[(make-parameter [v any/c] @defproc[(make-parameter [v any/c]
[guard (or/c (any/c . -> . any) false/c) #f]) [guard (or/c (any/c . -> . any) #f) #f])
parameter?]{ parameter?]{
Returns a new parameter procedure. The value of the parameter is Returns a new parameter procedure. The value of the parameter is

View File

@ -68,7 +68,7 @@ used instead of @scheme[string->path] when a string represents a
single path element.} single path element.}
@defproc[(bytes->path [bstr bytes?] @defproc[(bytes->path [bstr bytes?]
[type (one-of/c 'unix 'windows) (system-path-convention-type)]) [type (or/c 'unix 'windows) (system-path-convention-type)])
path?]{ path?]{
Produces a path (for some platform) whose byte-string name is Produces a path (for some platform) whose byte-string name is
@ -133,7 +133,7 @@ As for @scheme[path->string], information can be lost from
@defproc[(bytes->path-element [bstr bytes?] @defproc[(bytes->path-element [bstr bytes?]
[type (one-of/c 'unix 'windows) (system-path-convention-type)]) [type (or/c 'unix 'windows) (system-path-convention-type)])
path?]{ path?]{
Like @scheme[bytes->path], except that @scheme[bstr] corresponds to a Like @scheme[bytes->path], except that @scheme[bstr] corresponds to a
@ -183,25 +183,24 @@ reassembling the result with @scheme[bytes->path-element] and
@defproc[(path-convention-type [path path?]) @defproc[(path-convention-type [path path?])
(one-of 'unix 'windows)]{ (or/c 'unix 'windows)]{
Accepts a path value (not a string) and returns its convention Accepts a path value (not a string) and returns its convention
type.} type.}
@defproc[(system-path-convention-type) @defproc[(system-path-convention-type)
(one-of 'unix 'windows)]{ (or/c 'unix 'windows)]{
Returns the path convention type of the current platform: Returns the path convention type of the current platform:
@indexed-scheme['unix] for @|AllUnix|, @indexed-scheme['windows] for @indexed-scheme['unix] for @|AllUnix|, @indexed-scheme['windows] for
Windows.} Windows.}
@defproc[(build-path [base (or/c path-string? @defproc[(build-path [base (or/c path-string? 'up 'same)]
(one-of/c 'up 'same))]
[sub (or/c (and/c path-string? [sub (or/c (and/c path-string?
(not/c complete-path?)) (not/c complete-path?))
(one-of/c 'up 'same))] ...) (or/c 'up 'same))] ...)
path?]{ path?]{
Creates a path given a base path and any number of sub-path Creates a path given a base path and any number of sub-path
@ -258,10 +257,9 @@ Windows examples.
]} ]}
@defproc[(build-path/convention-type [type (one-of/c 'unix 'windows)] @defproc[(build-path/convention-type [type (or/c 'unix 'windows)]
[base path-string?] [base path-string?]
[sub (or/c path-string? [sub (or/c path-string? 'up 'same)] ...)
(one-of/c 'up 'same))] ...)
path?]{ path?]{
Like @scheme[build-path], except a path convention type is specified Like @scheme[build-path], except a path convention type is specified
@ -419,10 +417,8 @@ This procedure does not access the filesystem.}
@defproc[(split-path [path path-string?]) @defproc[(split-path [path path-string?])
(values (or/c path? (values (or/c path? 'relative #f)
(one-of/c 'relative #f)) (or/c path? 'up 'same)
(or/c path?
(one-of/c 'up 'same))
boolean?)]{ boolean?)]{
Deconstructs @scheme[path] into a smaller path and an immediate Deconstructs @scheme[path] into a smaller path and an immediate
@ -499,21 +495,21 @@ to the end.}
@note-lib[scheme/path] @note-lib[scheme/path]
@defproc[(explode-path [path path-string?]) @defproc[(explode-path [path path-string?])
(listof (or/c path? (one-of/c 'up 'same)))]{ (listof (or/c path? 'up 'same))]{
Returns the list of path element that constitute @scheme[path]. If Returns the list of path element that constitute @scheme[path]. If
@scheme[path] is simplified in the sense of @scheme[simple-form-path], @scheme[path] is simplified in the sense of @scheme[simple-form-path],
then the result is always a list of paths, and the first element of then the result is always a list of paths, and the first element of
the list is a root.} the list is a root.}
@defproc[(file-name-from-path [path path-string?]) (or/c path? false/c)]{ @defproc[(file-name-from-path [path path-string?]) (or/c path? #f)]{
Returns the last element of @scheme[path]. If @scheme[path] Returns the last element of @scheme[path]. If @scheme[path]
syntactically a directory path (see @scheme[split-path]), then then syntactically a directory path (see @scheme[split-path]), then then
result is @scheme[#f].} result is @scheme[#f].}
@defproc[(filename-extension [path path-string?]) @defproc[(filename-extension [path path-string?])
(or/c bytes? false/c)]{ (or/c bytes? #f)]{
Returns a byte string that is the extension part of the filename in Returns a byte string that is the extension part of the filename in
@scheme[path] without the @litchar{.} separator. If @scheme[path] is @scheme[path] without the @litchar{.} separator. If @scheme[path] is
@ -548,7 +544,7 @@ An error is signaled by @scheme[normalize-path] if the input
path contains an embedded path for a non-existent directory, path contains an embedded path for a non-existent directory,
or if an infinite cycle of soft links is detected.} or if an infinite cycle of soft links is detected.}
@defproc[(path-only [path path-string?]) (or/c path? false/c)]{ @defproc[(path-only [path path-string?]) (or/c path? #f)]{
If @scheme[path] is a filename, the file's path is returned. If If @scheme[path] is a filename, the file's path is returned. If
@scheme[path] is syntactically a directory, @scheme[#f] is returned.} @scheme[path] is syntactically a directory, @scheme[#f] is returned.}

View File

@ -56,8 +56,8 @@ TCP ports, and custom ports (see @secref["customport"]) use
buffers; when called on a port without a buffer, @scheme[flush-output] 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?]) (one-of/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 (one-of/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

@ -27,43 +27,43 @@ input ports as it becomes available.}
@defproc[(make-input-port/read-to-peek @defproc[(make-input-port/read-to-peek
[name any/c] [name any/c]
[read-in (bytes? [read-in (bytes?
. -> . (one-of/c exact-nonnegative-integer? . -> . (or/c exact-nonnegative-integer?
eof-object? eof-object?
procedure? procedure?
evt?))] evt?))]
[fast-peek (or/c false/c [fast-peek (or/c #f
(bytes? exact-nonnegative-integer? (bytes? exact-nonnegative-integer?
(bytes? exact-nonnegative-integer? (bytes? exact-nonnegative-integer?
. -> . (one-of/c exact-nonnegative-integer? . -> . (or/c exact-nonnegative-integer?
eof-object? eof-object?
procedure? procedure?
evt? evt?
false/c)) #f))
. -> . (one-of/c exact-nonnegative-integer? . -> . (or/c exact-nonnegative-integer?
eof-object? eof-object?
procedure? procedure?
evt? evt?
false/c)))] #f)))]
[close (-> any)] [close (-> any)]
[get-location (or/c [get-location (or/c
(-> (->
(values (values
(or/c exact-positive-integer? false/c) (or/c exact-positive-integer? #f)
(or/c exact-nonnegative-integer? false/c) (or/c exact-nonnegative-integer? #f)
(or/c exact-positive-integer? false/c))) (or/c exact-positive-integer? #f)))
false/c) #f)
#f] #f]
[count-lines! (-> any) void] [count-lines! (-> any) void]
[init-position exact-positive-integer? 1] [init-position exact-positive-integer? 1]
[buffer-mode (or/c (case-> ((one-of/c 'block 'none) . -> . any) [buffer-mode (or/c (case-> ((or/c 'block 'none) . -> . any)
(-> (one-of/c 'block 'none #f))) (-> (or/c 'block 'none #f)))
false/c) #f)
#f] #f]
[buffering? any/c #f] [buffering? any/c #f]
[on-consume (or/c ((or/c exact-nonnegative-integer? eof-object? [on-consume (or/c ((or/c exact-nonnegative-integer? eof-object?
procedure? evt?) procedure? evt?)
. -> . any) . -> . any)
false/c) #f)
#f]) #f])
input-port?]{ input-port?]{
@ -144,7 +144,7 @@ determine the names of the result ports.}
@defproc[(merge-input [a-in input-port?] @defproc[(merge-input [a-in input-port?]
[b-in input-port?] [b-in input-port?]
[buffer-limit (or/c exact-nonnegative-integer? false/c) 4096]) [buffer-limit (or/c exact-nonnegative-integer? #f) 4096])
input-port?]{ input-port?]{
Accepts two input ports and returns a new input port. The new port Accepts two input ports and returns a new input port. The new port
@ -196,7 +196,7 @@ it defaults to @scheme[0].}
@defproc[(reencode-input-port [in input-port?] @defproc[(reencode-input-port [in input-port?]
[encoding string?] [encoding string?]
[error-bytes (or/c false/c bytes?)] [error-bytes (or/c #f bytes?)]
[close? any/c #t] [close? any/c #t]
[name any/c (object-name in)] [name any/c (object-name in)]
[convert-newlines? any/c #f] [convert-newlines? any/c #f]
@ -230,10 +230,10 @@ incomplete encoding sequence.)}
@defproc[(reencode-output-port [out output-port?] @defproc[(reencode-output-port [out output-port?]
[encoding string?] [encoding string?]
[error-bytes (or/c false/c bytes?)] [error-bytes (or/c #f bytes?)]
[close? any/c #t] [close? any/c #t]
[name any/c (object-name out)] [name any/c (object-name out)]
[newline-bytes (or/c false/c bytes?) #f] [newline-bytes (or/c #f bytes?) #f]
[enc-error (string? output-port? . -> . any) [enc-error (string? output-port? . -> . any)
(lambda (msg port) (error ...))]) (lambda (msg port) (error ...))])
output-port?]{ output-port?]{
@ -297,8 +297,8 @@ the result port does not affect writing directly to @scheme[out].}
@defproc[(relocate-input-port [in input-port?] @defproc[(relocate-input-port [in input-port?]
[line (or/c exact-positive-integer? false/c)] [line (or/c exact-positive-integer? #f)]
[column (or/c exact-nonnegative-integer? false/c)] [column (or/c exact-nonnegative-integer? #f)]
[position exact-positive-integer?] [position exact-positive-integer?]
[close? any/c #t]) [close? any/c #t])
input-port?]{ input-port?]{
@ -327,8 +327,8 @@ the resulting port does not close @scheme[in].}
@defproc[(relocate-output-port [out output-port?] @defproc[(relocate-output-port [out output-port?]
[line (or/c exact-positive-integer? false/c)] [line (or/c exact-positive-integer? #f)]
[column (or/c exact-nonnegative-integer? false/c)] [column (or/c exact-nonnegative-integer? #f)]
[position exact-positive-integer?] [position exact-positive-integer?]
[close? any/c #t]) [close? any/c #t])
output-port?]{ output-port?]{
@ -340,10 +340,10 @@ Like @scheme[relocate-input-port], but for output ports.}
[get-location (or/c [get-location (or/c
(-> (->
(values (values
(or/c exact-positive-integer? false/c) (or/c exact-positive-integer? #f)
(or/c exact-nonnegative-integer? false/c) (or/c exact-nonnegative-integer? #f)
(or/c exact-positive-integer? false/c))) (or/c exact-positive-integer? #f)))
false/c)] #f)]
[init-pos exact-positive-integer?] [init-pos exact-positive-integer?]
[close? any/c #t] [close? any/c #t]
[count-lines! (-> any) void]) [count-lines! (-> any) void])
@ -363,10 +363,10 @@ is enabled for the resulting port. The default is @scheme[void].}
[get-location (or/c [get-location (or/c
(-> (->
(values (values
(or/c exact-positive-integer? false/c) (or/c exact-positive-integer? #f)
(or/c exact-nonnegative-integer? false/c) (or/c exact-nonnegative-integer? #f)
(or/c exact-positive-integer? false/c))) (or/c exact-positive-integer? #f)))
false/c)] #f)]
[init-pos exact-positive-integer?] [init-pos exact-positive-integer?]
[close? any/c #t] [close? any/c #t]
[count-lines! (-> any) void]) [count-lines! (-> any) void])
@ -455,7 +455,7 @@ a byte string.}
@defproc[(read-line-evt [in input-port?] @defproc[(read-line-evt [in input-port?]
[mode (one-of 'linefeed 'return 'return-linefeed 'any 'any-one)]) [mode (or/c 'linefeed 'return 'return-linefeed 'any 'any-one)])
evt?]{ evt?]{
Returns a @tech{synchronizable event} that is ready when a line of Returns a @tech{synchronizable event} that is ready when a line of
@ -470,7 +470,7 @@ bytes in the port's stream.}
@defproc[(read-bytes-line-evt [in input-port?] @defproc[(read-bytes-line-evt [in input-port?]
[mode (one-of 'linefeed 'return 'return-linefeed 'any 'any-one)]) [mode (or/c 'linefeed 'return 'return-linefeed 'any 'any-one)])
evt?]{ evt?]{
Like @scheme[read-line], but returns a byte string instead of a Like @scheme[read-line], but returns a byte string instead of a
@ -479,9 +479,9 @@ 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? false/c)][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? false/c)][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?])]{

View File

@ -50,9 +50,9 @@ counting is automatically enabled for the port. Line counting cannot
be disabled for a port after it is enabled.} be disabled for a port after it is enabled.}
@defproc[(port-next-location [port port?]) @defproc[(port-next-location [port port?])
(values (or/c exact-positive-integer? false/c) (values (or/c exact-positive-integer? #f)
(or/c exact-nonnegative-integer? false/c) (or/c exact-nonnegative-integer? #f)
(or/c exact-positive-integer? false/c))]{ (or/c exact-positive-integer? #f))]{
Returns three values: an integer or @scheme[#f] for the line number of Returns three values: an integer or @scheme[#f] for the line number of
the next read/written item, an integer or @scheme[#f] for the next the next read/written item, an integer or @scheme[#f] for the next

View File

@ -67,7 +67,7 @@ by @scheme[read-eval-print-loop].}
@section{Basic Pretty-Print Options} @section{Basic Pretty-Print Options}
@defparam[pretty-print-columns width (or/c exact-positive-integer? (one-of/c 'infinity))]{ @defparam[pretty-print-columns width (or/c exact-positive-integer? 'infinity)]{
A parameter that determines the default width for pretty printing. A parameter that determines the default width for pretty printing.
@ -76,7 +76,7 @@ is never broken into lines, and a newline is not added to the end of
the output.} the output.}
@defparam[pretty-print-depth depth (or/c exact-nonnegative-integer? false/c)]{ @defparam[pretty-print-depth depth (or/c exact-nonnegative-integer? #f)]{
Parameter that controls the default depth for recursive pretty Parameter that controls the default depth for recursive pretty
printing. Printing to @scheme[depth] means that elements nested more printing. Printing to @scheme[depth] means that elements nested more
@ -177,7 +177,7 @@ so that the output follows popular code-formatting rules:
@defparam[pretty-print-remap-stylable @defparam[pretty-print-remap-stylable
proc proc
(any/c . -> . (or/c symbol? false/c))]{ (any/c . -> . (or/c symbol? #f))]{
A parameter that controls remapping for styles. This procedure is A parameter that controls remapping for styles. This procedure is
called with each subexpression that appears as the first element in a called with each subexpression that appears as the first element in a
@ -202,10 +202,10 @@ target column width, typically obtained from
@defparam[pretty-print-print-line proc @defparam[pretty-print-print-line proc
((or/c exact-nonnegative-integer? false/c) ((or/c exact-nonnegative-integer? #f)
output-port? output-port?
exact-nonnegative-integer? exact-nonnegative-integer?
(or/c exact-nonnegative-integer? (one-of/c 'infinity)) (or/c exact-nonnegative-integer? 'infinity)
. -> . . -> .
exact-nonnegative-integer?)]{ exact-nonnegative-integer?)]{
@ -250,7 +250,7 @@ redirected to the port supplied to @scheme[pretty-print] or
@defparam[pretty-print-size-hook proc @defparam[pretty-print-size-hook proc
(any/c boolean? output-port? (any/c boolean? output-port?
. -> . . -> .
(or/c false/c exact-nonnegative-integer?))]{ (or/c #f exact-nonnegative-integer?))]{
A parameter that determines a sizing hook for pretty-printing. A parameter that determines a sizing hook for pretty-printing.

View File

@ -152,8 +152,7 @@ in @scheme[(procedure-arity proc)], the @exnraise[exn:fail:contract].
@defproc[(procedure-keywords [proc procedure?]) @defproc[(procedure-keywords [proc procedure?])
(values (values
(listof keyword?) (listof keyword?)
(or/c (listof keyword?) (or/c (listof keyword?) #f))]{
false/c))]{
Returns information about the keyword arguments required and accepted Returns information about the keyword arguments required and accepted
by a procedure. The first result is a list of keywords (sorted by by a procedure. The first result is a list of keywords (sorted by
@ -201,7 +200,7 @@ obtains its result from @scheme[plain-proc].
[arity procedure-arity?] [arity procedure-arity?]
[required-kws (listof keyword?)] [required-kws (listof keyword?)]
[allowed-kws (or/c (listof keyword?) [allowed-kws (or/c (listof keyword?)
false/c)]) #f)])
procedure?]{ procedure?]{
Like @scheme[procedure-reduce-arity], but constrains the keyword Like @scheme[procedure-reduce-arity], but constrains the keyword
@ -326,7 +325,7 @@ Returns @scheme[#t] if instances of the structure type represented by
@scheme[type] are procedures (according to @scheme[procedure?]), @scheme[type] are procedures (according to @scheme[procedure?]),
@scheme[#f] otherwise.} @scheme[#f] otherwise.}
@defproc[(procedure-extract-target [proc procedure?]) (or/c false/c procedure?)]{ @defproc[(procedure-extract-target [proc procedure?]) (or/c #f procedure?)]{
If @scheme[proc] is an instance of a structure type with property If @scheme[proc] is an instance of a structure type with property
@scheme[prop:procedure], and if the property value indicates a field @scheme[prop:procedure], and if the property value indicates a field

View File

@ -27,7 +27,7 @@ See @secref["reader"] for information on the default reader in
@scheme[read-syntax] mode.} @scheme[read-syntax] mode.}
@defproc[(read/recursive [in input-port? (current-input-port)] @defproc[(read/recursive [in input-port? (current-input-port)]
[start (or/c character? false/c) #f] [start (or/c character? #f) #f]
[readtable readtable? (current-readtable)] [readtable readtable? (current-readtable)]
[graph? any/c #f]) [graph? any/c #f])
any]{ any]{
@ -75,7 +75,7 @@ See @secref["readtables"] for an extended example that uses
@defproc[(read-syntax/recursive [source-name any/c (object-name in)] @defproc[(read-syntax/recursive [source-name any/c (object-name in)]
[in input-port? (current-input-port)] [in input-port? (current-input-port)]
[start (or/c character? false/c) #f] [start (or/c character? #f) #f]
[readtable readtable? (current-readtable)] [readtable readtable? (current-readtable)]
[graph? any/c #f]) [graph? any/c #f])
any]{ any]{
@ -238,7 +238,7 @@ a module-path datum following @litchar{#reader}. See
@secref["parse-reader"] for more information.} @secref["parse-reader"] for more information.}
@defparam[current-readtable readtable (or/c readtable? false/c)]{ @defparam[current-readtable readtable (or/c readtable? #f)]{
A parameter whose value determines a readtable that A parameter whose value determines a readtable that
adjusts the parsing of S-expression input, where @scheme[#f] implies the adjusts the parsing of S-expression input, where @scheme[#f] implies the
@ -315,7 +315,7 @@ Like @scheme[read-syntax], but for Honu mode (see
@secref["parse-honu"]).} @secref["parse-honu"]).}
@defproc[(read-honu/recursive [in input-port? (current-input-port)] @defproc[(read-honu/recursive [in input-port? (current-input-port)]
[start (or/c character? false/c) #f] [start (or/c character? #f) #f]
[readtable readtable? (current-readtable)] [readtable readtable? (current-readtable)]
[graph? any/c #f]) [graph? any/c #f])
any]{ any]{
@ -325,7 +325,7 @@ Like @scheme[read/recursive], but for Honu mode (see
@defproc[(read-honu-syntax/recursive [source-name any/c (object-name in)] @defproc[(read-honu-syntax/recursive [source-name any/c (object-name in)]
[in input-port? (current-input-port)] [in input-port? (current-input-port)]
[start (or/c character? false/c) #f] [start (or/c character? #f) #f]
[readtable readtable? (current-readtable)] [readtable readtable? (current-readtable)]
[graph? any/c #f]) [graph? any/c #f])
any]{ any]{

View File

@ -69,8 +69,8 @@ otherwise.
} }
@defproc[(make-readtable [readtable readtable?] @defproc[(make-readtable [readtable readtable?]
[key (or/c character? false/c)] [key (or/c character? #f)]
[mode (or/c (one-of 'terminating-macro [mode (or/c (or/c 'terminating-macro
'non-terminating-macro 'non-terminating-macro
'dispatch-macro) 'dispatch-macro)
character?)] character?)]
@ -161,10 +161,10 @@ character to be treated as whitespace, and it might use
@defproc[(readtable-mapping [readtable readtable?][char character?]) @defproc[(readtable-mapping [readtable readtable?][char character?])
(values (or/c character? (values (or/c character?
(one-of 'terminating-macro (or/c 'terminating-macro
'non-terminating-macro)) 'non-terminating-macro))
(or/c false/c procedure?) (or/c #f procedure?)
(or/c false/c procedure?))]{ (or/c #f procedure?))]{
Produces information about the mappings in @scheme[readtable] for Produces information about the mappings in @scheme[readtable] for
@scheme[char]. The result is three values: @scheme[char]. The result is three values:

View File

@ -204,12 +204,12 @@ case-sensitively.
@defproc[(regexp-match [pattern (or/c string? bytes? regexp? byte-regexp?)] @defproc[(regexp-match [pattern (or/c string? bytes? regexp? byte-regexp?)]
[input (or/c string? bytes? input-port?)] [input (or/c string? bytes? input-port?)]
[start-pos exact-nonnegative-integer? 0] [start-pos exact-nonnegative-integer? 0]
[end-pos (or/c exact-nonnegative-integer? false/c) #f] [end-pos (or/c exact-nonnegative-integer? #f) #f]
[output-port (or/c output-port? false/c) #f]) [output-port (or/c output-port? #f) #f])
(or/c (listof (or/c (cons (or/c string? bytes?) (or/c (listof (or/c (cons (or/c string? bytes?)
(or/c string? bytes?)) (or/c string? bytes?))
false/c)) #f))
false/c)]{ #f)]{
Attempts to match @scheme[pattern] (a string, byte string, regexp Attempts to match @scheme[pattern] (a string, byte string, regexp
value, or byte-regexp value) once to a portion of @scheme[input]. The value, or byte-regexp value) once to a portion of @scheme[input]. The
@ -304,7 +304,7 @@ bytes. To avoid such interleaving, use @scheme[regexp-match-peek]
@defproc[(regexp-match* [pattern (or/c string? bytes? regexp? byte-regexp?)] @defproc[(regexp-match* [pattern (or/c string? bytes? regexp? byte-regexp?)]
[input (or/c string? bytes? input-port?)] [input (or/c string? bytes? input-port?)]
[start-pos exact-nonnegative-integer? 0] [start-pos exact-nonnegative-integer? 0]
[end-pos (or/c exact-nonnegative-integer? false/c) #f]) [end-pos (or/c exact-nonnegative-integer? #f) #f])
(listof (or/c string? bytes?))]{ (listof (or/c string? bytes?))]{
Like @scheme[regexp-match], but the result is a list of strings or Like @scheme[regexp-match], but the result is a list of strings or
@ -335,12 +335,12 @@ port).
[pattern (or/c string? bytes? regexp? byte-regexp?)] [pattern (or/c string? bytes? regexp? byte-regexp?)]
[input input-port?] [input input-port?]
[start-pos exact-nonnegative-integer? 0] [start-pos exact-nonnegative-integer? 0]
[end-pos (or/c exact-nonnegative-integer? false/c) #f] [end-pos (or/c exact-nonnegative-integer? #f) #f]
[output-port (or/c output-port? false/c) #f]) [output-port (or/c output-port? #f) #f])
(or/c (listof (or/c (cons (or/c string? bytes?) (or/c (listof (or/c (cons (or/c string? bytes?)
(or/c string? bytes?)) (or/c string? bytes?))
false/c)) #f))
false/c)]{ #f)]{
Like @scheme[regexp-match] on input ports, except that if the match Like @scheme[regexp-match] on input ports, except that if the match
fails, no characters are read and discarded from @scheme[in]. fails, no characters are read and discarded from @scheme[in].
@ -356,12 +356,12 @@ fails.}
@defproc[(regexp-match-positions [pattern (or/c string? bytes? regexp? byte-regexp?)] @defproc[(regexp-match-positions [pattern (or/c string? bytes? regexp? byte-regexp?)]
[input (or/c string? bytes? input-port?)] [input (or/c string? bytes? input-port?)]
[start-pos exact-nonnegative-integer? 0] [start-pos exact-nonnegative-integer? 0]
[end-pos (or/c exact-nonnegative-integer? false/c) #f] [end-pos (or/c exact-nonnegative-integer? #f) #f]
[output-port (or/c output-port? false/c) #f]) [output-port (or/c output-port? #f) #f])
(or/c (listof (or/c (cons exact-nonnegative-integer? (or/c (listof (or/c (cons exact-nonnegative-integer?
exact-nonnegative-integer?) exact-nonnegative-integer?)
false/c)) #f))
false/c)]{ #f)]{
Like @scheme[regexp-match], but returns a list of number pairs (and Like @scheme[regexp-match], but returns a list of number pairs (and
@scheme[#f]) instead of a list of strings. Each pair of numbers refers @scheme[#f]) instead of a list of strings. Each pair of numbers refers
@ -387,7 +387,7 @@ positions indicate the number of bytes that were read, including
@defproc[(regexp-match-positions* [pattern (or/c string? bytes? regexp? byte-regexp?)] @defproc[(regexp-match-positions* [pattern (or/c string? bytes? regexp? byte-regexp?)]
[input (or/c string? bytes? input-port?)] [input (or/c string? bytes? input-port?)]
[start-pos exact-nonnegative-integer? 0] [start-pos exact-nonnegative-integer? 0]
[end-pos (or/c exact-nonnegative-integer? false/c) #f]) [end-pos (or/c exact-nonnegative-integer? #f) #f])
(listof (cons exact-nonnegative-integer? (listof (cons exact-nonnegative-integer?
exact-nonnegative-integer?))]{ exact-nonnegative-integer?))]{
@ -402,8 +402,8 @@ like @scheme[regexp-match*].
@defproc[(regexp-match? [pattern (or/c string? bytes? regexp? byte-regexp?)] @defproc[(regexp-match? [pattern (or/c string? bytes? regexp? byte-regexp?)]
[input (or/c string? bytes? input-port?)] [input (or/c string? bytes? input-port?)]
[start-pos exact-nonnegative-integer? 0] [start-pos exact-nonnegative-integer? 0]
[end-pos (or/c exact-nonnegative-integer? false/c) #f] [end-pos (or/c exact-nonnegative-integer? #f) #f]
[output-port (or/c output-port? false/c) #f]) [output-port (or/c output-port? #f) #f])
boolean?]{ boolean?]{
Like @scheme[regexp-match], but returns merely @scheme[#t] when the Like @scheme[regexp-match], but returns merely @scheme[#t] when the
@ -431,11 +431,11 @@ entire content of @scheme[input] matches @scheme[pattern].
@defproc[(regexp-match-peek [pattern (or/c string? bytes? regexp? byte-regexp?)] @defproc[(regexp-match-peek [pattern (or/c string? bytes? regexp? byte-regexp?)]
[input input-port?] [input input-port?]
[start-pos exact-nonnegative-integer? 0] [start-pos exact-nonnegative-integer? 0]
[end-pos (or/c exact-nonnegative-integer? false/c) #f] [end-pos (or/c exact-nonnegative-integer? #f) #f]
[progress (or/c evt false/c) #f]) [progress (or/c evt #f) #f])
(or/c (listof (or/c (cons bytes? bytes?) (or/c (listof (or/c (cons bytes? bytes?)
false/c)) #f))
false/c)]{ #f)]{
Like @scheme[regexp-match] on input ports, but only peeks bytes from Like @scheme[regexp-match] on input ports, but only peeks bytes from
@scheme[input-port] instead of reading them. Furthermore, instead of @scheme[input-port] instead of reading them. Furthermore, instead of
@ -461,12 +461,12 @@ information if another process meanwhile reads from
@defproc[(regexp-match-peek-positions [pattern (or/c string? bytes? regexp? byte-regexp?)] @defproc[(regexp-match-peek-positions [pattern (or/c string? bytes? regexp? byte-regexp?)]
[input input-port?] [input input-port?]
[start-pos exact-nonnegative-integer? 0] [start-pos exact-nonnegative-integer? 0]
[end-pos (or/c exact-nonnegative-integer? false/c) #f] [end-pos (or/c exact-nonnegative-integer? #f) #f]
[progress (or/c evt false/c) #f]) [progress (or/c evt #f) #f])
(or/c (listof (or/c (cons exact-nonnegative-integer? (or/c (listof (or/c (cons exact-nonnegative-integer?
exact-nonnegative-integer?) exact-nonnegative-integer?)
false/c)) #f))
false/c)]{ #f)]{
Like @scheme[regexp-match-positions] on input ports, but only peeks Like @scheme[regexp-match-positions] on input ports, but only peeks
bytes from @scheme[input-port] instead of reading them, and with a bytes from @scheme[input-port] instead of reading them, and with a
@ -476,11 +476,11 @@ bytes from @scheme[input-port] instead of reading them, and with a
@defproc[(regexp-match-peek-immediate [pattern (or/c string? bytes? regexp? byte-regexp?)] @defproc[(regexp-match-peek-immediate [pattern (or/c string? bytes? regexp? byte-regexp?)]
[input input-port?] [input input-port?]
[start-pos exact-nonnegative-integer? 0] [start-pos exact-nonnegative-integer? 0]
[end-pos (or/c exact-nonnegative-integer? false/c) #f] [end-pos (or/c exact-nonnegative-integer? #f) #f]
[progress (or/c evt false/c) #f]) [progress (or/c evt #f) #f])
(or/c (listof (or/c (cons bytes? bytes?) (or/c (listof (or/c (cons bytes? bytes?)
false/c)) #f))
false/c)]{ #f)]{
Like @scheme[regexp-match-peek], but it attempts to match only bytes Like @scheme[regexp-match-peek], but it attempts to match only bytes
that are available from @scheme[input-port] without blocking. The that are available from @scheme[input-port] without blocking. The
@ -491,12 +491,12 @@ match fails if not-yet-available characters might be used to match
@defproc[(regexp-match-peek-positions-immediate [pattern (or/c string? bytes? regexp? byte-regexp?)] @defproc[(regexp-match-peek-positions-immediate [pattern (or/c string? bytes? regexp? byte-regexp?)]
[input input-port?] [input input-port?]
[start-pos exact-nonnegative-integer? 0] [start-pos exact-nonnegative-integer? 0]
[end-pos (or/c exact-nonnegative-integer? false/c) #f] [end-pos (or/c exact-nonnegative-integer? #f) #f]
[progress (or/c evt false/c) #f]) [progress (or/c evt #f) #f])
(or/c (listof (or/c (cons exact-nonnegative-integer? (or/c (listof (or/c (cons exact-nonnegative-integer?
exact-nonnegative-integer?) exact-nonnegative-integer?)
false/c)) #f))
false/c)]{ #f)]{
Like @scheme[regexp-match-peek-positions], but it attempts to match Like @scheme[regexp-match-peek-positions], but it attempts to match
only bytes that are available from @scheme[input-port] without only bytes that are available from @scheme[input-port] without
@ -507,7 +507,7 @@ used to match @scheme[pattern].}
@defproc[(regexp-match-peek-positions* [pattern (or/c string? bytes? regexp? byte-regexp?)] @defproc[(regexp-match-peek-positions* [pattern (or/c string? bytes? regexp? byte-regexp?)]
[input input-port?] [input input-port?]
[start-pos exact-nonnegative-integer? 0] [start-pos exact-nonnegative-integer? 0]
[end-pos (or/c exact-nonnegative-integer? false/c) #f]) [end-pos (or/c exact-nonnegative-integer? #f) #f])
(listof (cons exact-nonnegative-integer? (listof (cons exact-nonnegative-integer?
exact-nonnegative-integer?))]{ exact-nonnegative-integer?))]{
@ -520,7 +520,7 @@ Like @scheme[regexp-match-peek-positions], but returns multiple matches like
@defproc[(regexp-split [pattern (or/c string? bytes? regexp? byte-regexp?)] @defproc[(regexp-split [pattern (or/c string? bytes? regexp? byte-regexp?)]
[input (or/c string? bytes? input-port?)] [input (or/c string? bytes? input-port?)]
[start-pos exact-nonnegative-integer? 0] [start-pos exact-nonnegative-integer? 0]
[end-pos (or/c exact-nonnegative-integer? false/c) #f]) [end-pos (or/c exact-nonnegative-integer? #f) #f])
(listof (or/c string? bytes?))]{ (listof (or/c string? bytes?))]{
The complement of @scheme[regexp-match*]: the result is a list of The complement of @scheme[regexp-match*]: the result is a list of

View File

@ -3,7 +3,7 @@
@title[#:tag "runtime"]{Environment and Runtime Information} @title[#:tag "runtime"]{Environment and Runtime Information}
@defproc[(getenv [name string?]) (or/c string? false/c)]{ @defproc[(getenv [name string?]) (or/c string? #f)]{
Gets the value of an operating system environment variable. The Gets the value of an operating system environment variable. The
@scheme[name] argument cannot contain a null character; if an @scheme[name] argument cannot contain a null character; if an
@ -18,7 +18,7 @@ contain a null character; the environment variable named by
@scheme[name] is set to @scheme[value]. The return value is @scheme[name] is set to @scheme[value]. The return value is
@scheme[#t] if the assignment succeeds, @scheme[#f] otherwise.} @scheme[#t] if the assignment succeeds, @scheme[#f] otherwise.}
@defproc[(system-type [mode (one-of 'os 'gc 'link 'so-suffix 'machine) @defproc[(system-type [mode (or/c 'os 'gc 'link 'so-suffix 'machine)
'os]) 'os])
(or/c symbol? string? bytes?)]{ (or/c symbol? string? bytes?)]{
@ -84,7 +84,7 @@ letters, followed by either nothing or a period). Under Windows and
Mac OS X, the result is determined by system calls.} Mac OS X, the result is determined by system calls.}
@defproc[(system-library-subpath [mode (one-of 'cgc '3m #f) @defproc[(system-library-subpath [mode (or/c 'cgc '3m #f)
(system-type 'gc)]) (system-type 'gc)])
path?]{ path?]{
@ -131,7 +131,7 @@ otherwise platform-independent.}
@defproc[(vector-set-performance-stats! [results (and/c vector? @defproc[(vector-set-performance-stats! [results (and/c vector?
(not/c immutable?))] (not/c immutable?))]
[thd (or/c thread? false/c) #f]) [thd (or/c thread? #f) #f])
void?]{ void?]{
Sets elements in @scheme[results] to report current performance Sets elements in @scheme[results] to report current performance

View File

@ -19,14 +19,14 @@ particular way and can have restricted resources (memory and time),
filesystem access, and network access. filesystem access, and network access.
@defproc*[([(make-evaluator [language (or/c module-path? @defproc*[([(make-evaluator [language (or/c module-path?
(list/c (one-of/c 'special) symbol?) (list/c 'special symbol?)
(cons/c (one-of/c 'begin) list?))] (cons/c 'begin list?))]
[input-program any/c] ... [input-program any/c] ...
[#:requires requires (listof (or/c module-path? path?))] [#:requires requires (listof (or/c module-path? path?))]
[#:allow-read allow (listof (or/c module-path? path?))]) [#:allow-read allow (listof (or/c module-path? path?))])
(any/c . -> . any)] (any/c . -> . any)]
[(make-module-evaluator [module-decl (or/c syntax? pair?)] [(make-module-evaluator [module-decl (or/c syntax? pair?)]
[#:language lang (or/c false/c module-path?)] [#:language lang (or/c #f module-path?)]
[#:allow-read allow (listof (or/c module-path? path?))]) [#:allow-read allow (listof (or/c module-path? path?))])
(any/c . -> . any)])]{ (any/c . -> . any)])]{
@ -265,10 +265,10 @@ calls @scheme[read-syntax], accumulating results in a list until it
receives @scheme[eof].} receives @scheme[eof].}
@defparam[sandbox-input in (or/c false/c @defparam[sandbox-input in (or/c #f
string? bytes? string? bytes?
input-port? input-port?
(one-of/c 'pipe) 'pipe
(-> input-port?))]{ (-> input-port?))]{
A parameter that determines the initial @scheme[current-input-port] A parameter that determines the initial @scheme[current-input-port]
@ -293,9 +293,11 @@ which creates an empty port. The following other values are allowed:
]} ]}
@defparam[sandbox-output in (or/c false/c @defparam[sandbox-output in (or/c #f
output-port? output-port?
(one-of/c 'pipe 'bytes 'string) 'pipe
'bytes
'string
(-> output-port?))]{ (-> output-port?))]{
A parameter that determines the initial @scheme[current-output-port] A parameter that determines the initial @scheme[current-output-port]
@ -325,9 +327,11 @@ values are allowed:
]} ]}
@defparam[sandbox-error-output in (or/c false/c @defparam[sandbox-error-output in (or/c #f
output-port? output-port?
(one-of/c 'pipe 'bytes 'string) 'pipe
'bytes
'string
(-> output-port?))]{ (-> output-port?))]{
Like @scheme[sandbox-output], but for the initial Like @scheme[sandbox-output], but for the initial
@ -414,8 +418,7 @@ default forbids all filesystem I/O except for things in
@defparam[sandbox-path-permissions perms @defparam[sandbox-path-permissions perms
(listof (list/c (one-of/c 'execute 'write 'delete (listof (list/c (or/c 'execute 'write 'delete 'read 'exists)
'read 'exists)
(or/c byte-regexp? bytes? string? path?)))]{ (or/c byte-regexp? bytes? string? path?)))]{
A parameter that configures the behavior of the default sandbox A parameter that configures the behavior of the default sandbox
@ -444,9 +447,9 @@ collection libraries (including
@defparam[sandbox-network-guard proc @defparam[sandbox-network-guard proc
(symbol? (symbol?
(or/c (and/c string? immutable?) false/c) (or/c (and/c string? immutable?) #f)
(or/c (integer-in 1 65535) false/c) (or/c (integer-in 1 65535) #f)
(one-of/c 'server 'client) (or/c 'server 'client)
. -> . any)]{ . -> . any)]{
A parameter that specifieds a procedure to be used (as is) by the A parameter that specifieds a procedure to be used (as is) by the
@ -455,9 +458,9 @@ network connection.}
@defparam[sandbox-eval-limits limits @defparam[sandbox-eval-limits limits
(or/c (list/c (or/c exact-nonnegative-integer? false/c) (or/c (list/c (or/c exact-nonnegative-integer? #f)
(or/c exact-nonnegative-integer? false/c)) (or/c exact-nonnegative-integer? #f))
false/c)]{ #f)]{
A parameter that determines the default limits on @italic{each} use of A parameter that determines the default limits on @italic{each} use of
a @scheme[make-evaluator] function, including the initial evaluation a @scheme[make-evaluator] function, including the initial evaluation
@ -513,8 +516,8 @@ propagates the break to the evaluator's context.}
@defproc[(set-eval-limits [evaluator (any/c . -> . any)] @defproc[(set-eval-limits [evaluator (any/c . -> . any)]
[secs (or/c exact-nonnegative-integer? false/c)] [secs (or/c exact-nonnegative-integer? #f)]
[mb (or/c exact-nonnegative-integer? false/c)]) void?]{ [mb (or/c exact-nonnegative-integer? #f)]) void?]{
Changes the per-expression limits that @scheme[evaluator] uses to Changes the per-expression limits that @scheme[evaluator] uses to
@scheme[sec] seconds and @scheme[mb] megabytes (either one can be @scheme[sec] seconds and @scheme[mb] megabytes (either one can be
@ -614,8 +617,8 @@ when the GUI library is available, such as using a new eventspace for
each evaluator.} each evaluator.}
@defproc[(call-with-limits [secs (or/c exact-nonnegative-integer? false/c)] @defproc[(call-with-limits [secs (or/c exact-nonnegative-integer? #f)]
[mb (or/c exact-nonnegative-integer? false/c)] [mb (or/c exact-nonnegative-integer? #f)]
[thunk (-> any)]) [thunk (-> any)])
any]{ any]{
@ -642,7 +645,7 @@ A macro version of @scheme[call-with-limits].}
@defproc*[([(exn:fail:resource? [v any/c]) boolean?] @defproc*[([(exn:fail:resource? [v any/c]) boolean?]
[(exn:fail:resource-resource [exn exn:fail:resource?]) [(exn:fail:resource-resource [exn exn:fail:resource?])
(one-of/c 'time 'memory)])]{ (or/c 'time 'memory)])]{
A predicate and accessor for exceptions that are raised by A predicate and accessor for exceptions that are raised by
@scheme[call-with-limits]. The @scheme[resource] field holds a symbol, @scheme[call-with-limits]. The @scheme[resource] field holds a symbol,

View File

@ -29,16 +29,15 @@ host platform.
@defproc[(make-security-guard [parent security-guard?] @defproc[(make-security-guard [parent security-guard?]
[file-guard (symbol? [file-guard (symbol?
(or/c path? false/c) (or/c path? #f)
(listof symbol?) (listof symbol?)
. -> . any)] . -> . any)]
[network-guard (symbol? [network-guard (symbol?
(or/c (and/c string? immutable?) false/c) (or/c (and/c string? immutable?) #f)
(or/c (integer-in 1 65535) false/c) (or/c (integer-in 1 65535) #f)
(one-of/c 'server 'client) (or/c 'server 'client)
. -> . any)] . -> . any)]
[link (or/c (symbol? path? path? . -> . any) [link (or/c (symbol? path? path? . -> . any) #f)
false/c)
#f]) #f])
security-guard?]{ security-guard?]{

View File

@ -63,7 +63,7 @@ the event does not decrement @scheme[sema]'s internal count.}
@defproc[(call-with-semaphore [sema semaphore?] @defproc[(call-with-semaphore [sema semaphore?]
[proc procedure?] [proc procedure?]
[try-fail-thunk (or/c (-> any) false/c) #f] [try-fail-thunk (or/c (-> any) #f) #f]
[arg any/c] ...) any]{ [arg any/c] ...) any]{
Waits on @scheme[sema] using @scheme[semaphore-wait], calls Waits on @scheme[sema] using @scheme[semaphore-wait], calls
@ -78,7 +78,7 @@ wait fails.}
@defproc[(call-with-semaphore/enable-break [sema semaphore?] @defproc[(call-with-semaphore/enable-break [sema semaphore?]
[proc procedure?] [proc procedure?]
[try-fail-thunk (or/c (-> any) false/c) #f] [try-fail-thunk (or/c (-> any) #f) #f]
[arg any/c] ...) any]{ [arg any/c] ...) any]{
Like @scheme[call-with-semaphore], except that Like @scheme[call-with-semaphore], except that
@scheme[semaphore-wait/enable-break] is used with @scheme[sema] in @scheme[semaphore-wait/enable-break] is used with @scheme[sema] in

View File

@ -81,7 +81,7 @@ Returns a sequence equivalent to @scheme[lst].
@defproc[(in-vector [vec vector?] @defproc[(in-vector [vec vector?]
[start exact-nonnegative-integer? 0] [start exact-nonnegative-integer? 0]
[stop (or/c exact-nonnegative-integer? false/c) #f] [stop (or/c exact-nonnegative-integer? #f) #f]
[step (and/c exact-integer? (not/c zero?)) 1]) [step (and/c exact-integer? (not/c zero?)) 1])
sequence?]{ sequence?]{
@ -110,7 +110,7 @@ demanded from the sequence.
@defproc[(in-string [str string?] @defproc[(in-string [str string?]
[start exact-nonnegative-integer? 0] [start exact-nonnegative-integer? 0]
[stop (or/c exact-nonnegative-integer? false/c) #f] [stop (or/c exact-nonnegative-integer? #f) #f]
[step (and/c exact-integer? (not/c zero?)) 1]) [step (and/c exact-integer? (not/c zero?)) 1])
sequence?]{ sequence?]{
Returns a sequence equivalent to @scheme[str] when no optional Returns a sequence equivalent to @scheme[str] when no optional
@ -123,7 +123,7 @@ The optional arguments @scheme[start], @scheme[stop], and
@defproc[(in-bytes [bstr bytes?] @defproc[(in-bytes [bstr bytes?]
[start exact-nonnegative-integer? 0] [start exact-nonnegative-integer? 0]
[stop (or/c exact-nonnegative-integer? false/c) #f] [stop (or/c exact-nonnegative-integer? #f) #f]
[step (and/c exact-integer? (not/c zero?)) 1]) [step (and/c exact-integer? (not/c zero?)) 1])
sequence?]{ sequence?]{
Returns a sequence equivalent to @scheme[bstr] when no optional Returns a sequence equivalent to @scheme[bstr] when no optional
@ -142,7 +142,7 @@ sequence whose elements are read as characters form @scheme[in] (as
opposed to using @scheme[in] directly as a sequence to get bytes).} opposed to using @scheme[in] directly as a sequence to get bytes).}
@defproc[(in-lines [in input-port? (current-input-port)] @defproc[(in-lines [in input-port? (current-input-port)]
[mode (one-of 'linefeed 'return 'return-linefeed 'any 'any-one) 'any]) [mode (or/c 'linefeed 'return 'return-linefeed 'any 'any-one) 'any])
sequence?]{ sequence?]{
Returns a sequence whose elements are the result of @scheme[(read-line Returns a sequence whose elements are the result of @scheme[(read-line

View File

@ -21,7 +21,7 @@ an end-of-file, then @scheme[eof] is returned.}
@defproc[(read-line [in input-port? (current-input-port)] @defproc[(read-line [in input-port? (current-input-port)]
[mode (one-of 'linefeed 'return 'return-linefeed 'any 'any-one) 'linefeed]) [mode (or/c 'linefeed 'return 'return-linefeed 'any 'any-one) 'linefeed])
(or/c string? eof-object?)]{ (or/c string? eof-object?)]{
Returns a string containing the next line of bytes from @scheme[in]. Returns a string containing the next line of bytes from @scheme[in].
@ -66,7 +66,7 @@ is opened in text mode, @scheme['linefeed] is usually the appropriate
@scheme[read-line] mode.} @scheme[read-line] mode.}
@defproc[(read-bytes-line [in input-port? (current-input-port)] @defproc[(read-bytes-line [in input-port? (current-input-port)]
[mode (one-of 'linefeed 'return 'return-linefeed 'any 'any-one) 'linefeed]) [mode (or/c 'linefeed 'return 'return-linefeed 'any 'any-one) 'linefeed])
(or/c bytes? eof-object?)]{ (or/c bytes? eof-object?)]{
Like @scheme[read-line], but reads bytes and produces a byte string.} Like @scheme[read-line], but reads bytes and produces a byte string.}
@ -230,7 +230,7 @@ string, and returns the number of bytes read.}
@defproc[(peek-bytes-avail! [bstr (and/c bytes? (not/c immutable?))] @defproc[(peek-bytes-avail! [bstr (and/c bytes? (not/c immutable?))]
[skip-bytes-amt exact-nonnegative-integer?] [skip-bytes-amt exact-nonnegative-integer?]
[progress (or/c evt? false/c) #f] [progress (or/c evt? #f) #f]
[in input-port? (current-input-port)] [in input-port? (current-input-port)]
[start-pos exact-nonnegative-integer? 0] [start-pos exact-nonnegative-integer? 0]
[end-pos exact-nonnegative-integer? (bytes-length bstr)]) [end-pos exact-nonnegative-integer? (bytes-length bstr)])
@ -254,7 +254,7 @@ case that @scheme[progress] becomes ready before bytes are peeked.}
@defproc[(peek-bytes-avail!* [bstr (and/c bytes? (not/c immutable?))] @defproc[(peek-bytes-avail!* [bstr (and/c bytes? (not/c immutable?))]
[skip-bytes-amt exact-nonnegative-integer?] [skip-bytes-amt exact-nonnegative-integer?]
[progress (or/c evt? false/c) #f] [progress (or/c evt? #f) #f]
[in input-port? (current-input-port)] [in input-port? (current-input-port)]
[start-pos exact-nonnegative-integer? 0] [start-pos exact-nonnegative-integer? 0]
[end-pos exact-nonnegative-integer? (bytes-length bstr)]) [end-pos exact-nonnegative-integer? (bytes-length bstr)])
@ -268,7 +268,7 @@ port.}
@defproc[(peek-bytes-avail!/enable-break [bstr (and/c bytes? (not/c immutable?))] @defproc[(peek-bytes-avail!/enable-break [bstr (and/c bytes? (not/c immutable?))]
[skip-bytes-amt exact-nonnegative-integer?] [skip-bytes-amt exact-nonnegative-integer?]
[progress (or/c evt? false/c) #f] [progress (or/c evt? #f) #f]
[in input-port? (current-input-port)] [in input-port? (current-input-port)]
[start-pos exact-nonnegative-integer? 0] [start-pos exact-nonnegative-integer? 0]
[end-pos exact-nonnegative-integer? (bytes-length bstr)]) [end-pos exact-nonnegative-integer? (bytes-length bstr)])
@ -316,7 +316,7 @@ value after @scheme[skip-bytes-amt] byte positions, it is returned.}
@defproc[(peek-byte-or-special [in input-port? (current-input-port)] @defproc[(peek-byte-or-special [in input-port? (current-input-port)]
[skip-bytes-amt exact-nonnegative-integer? 0] [skip-bytes-amt exact-nonnegative-integer? 0]
[progress (or/c evt? false/c) #f]) [progress (or/c evt? #f) #f])
(or/c character? eof-object? any/c)]{ (or/c character? eof-object? any/c)]{
Like @scheme[peek-char-or-special], but reads and returns a byte Like @scheme[peek-char-or-special], but reads and returns a byte

View File

@ -69,7 +69,7 @@ is raised.}
[out output-port? (current-output-port)] [out output-port? (current-output-port)]
[start-pos exact-nonnegative-integer? 0] [start-pos exact-nonnegative-integer? 0]
[end-pos exact-nonnegative-integer? (bytes-length bstr)]) [end-pos exact-nonnegative-integer? (bytes-length bstr)])
(or/c exact-nonnegative-integer? false/c)]{ (or/c exact-nonnegative-integer? #f)]{
Like @scheme[write-bytes-avail], but never blocks, returns @scheme[#f] Like @scheme[write-bytes-avail], but never blocks, returns @scheme[#f]
if the port contains buffered data that cannot be written immediately, if the port contains buffered data that cannot be written immediately,

View File

@ -51,7 +51,7 @@ structure types.}
@defproc[(struct-info [v any/c]) @defproc[(struct-info [v any/c])
(values (or/c struct-type? false/c) (values (or/c struct-type? #f)
boolean?)]{ boolean?)]{
Returns two values: Returns two values:
@ -77,7 +77,7 @@ Returns two values:
struct-accessor-procedure? struct-accessor-procedure?
struct-mutator-procedure? struct-mutator-procedure?
(listof exact-nonnegative-integer?) (listof exact-nonnegative-integer?)
(or/c struct-type? false/c) (or/c struct-type? #f)
boolean?)]{ boolean?)]{
Returns eight values that provide information about the structure type Returns eight values that provide information about the structure type

View File

@ -81,22 +81,22 @@ structures depends on the current inspector.)
@section[#:tag "creatingmorestructs"]{Creating Structure Types} @section[#:tag "creatingmorestructs"]{Creating Structure Types}
@defproc[(make-struct-type [name symbol?] @defproc[(make-struct-type [name symbol?]
[super-type (or/c struct-type? false/c)] [super-type (or/c struct-type? #f)]
[init-field-cnt exact-nonnegative-integer?] [init-field-cnt exact-nonnegative-integer?]
[auto-field-cnt exact-nonnegative-integer?] [auto-field-cnt exact-nonnegative-integer?]
[auto-v any/c #f] [auto-v any/c #f]
[props (listof (cons/c struct-type-property? [props (listof (cons/c struct-type-property?
any/c)) any/c))
null] null]
[inspector (or/c inspector? false/c (one-of/c 'prefab)) [inspector (or/c inspector? #f 'prefab)
(current-inspector)] (current-inspector)]
[proc-spec (or/c procedure? [proc-spec (or/c procedure?
exact-nonnegative-integer? exact-nonnegative-integer?
false/c) #f)
#f] #f]
[immutables (listof exact-nonnegative-integer?) [immutables (listof exact-nonnegative-integer?)
null] null]
[guard (or/c procedure? false/c) #f]) [guard (or/c procedure? #f) #f])
(values struct-type? (values struct-type?
struct-constructor-procedure? struct-constructor-procedure?
struct-predicate-procedure? struct-predicate-procedure?
@ -278,7 +278,7 @@ A @deftech{structure type property} allows per-type information to be
property value with a new value. property value with a new value.
@defproc[(make-struct-type-property [name symbol?] @defproc[(make-struct-type-property [name symbol?]
[guard (or/c procedure? false/c) #f] [guard (or/c procedure? #f) #f]
[supers (listof (cons/c struct-type-property? [supers (listof (cons/c struct-type-property?
(any/c . -> . any/c))) (any/c . -> . any/c)))
null]) null])
@ -443,7 +443,7 @@ is inaccessible.)}
@scheme[define-struct], @scheme[make-struct-type], or @scheme[define-struct], @scheme[make-struct-type], or
@scheme[make-struct-field-mutator], @scheme[#f] otherwise.} @scheme[make-struct-field-mutator], @scheme[#f] otherwise.}
@defproc[(prefab-struct-key [v any/c]) (or/c false/c symbol? list?)]{ @defproc[(prefab-struct-key [v any/c]) (or/c #f symbol? list?)]{
Returns @scheme[#f] if @scheme[v] is not an instance of a Returns @scheme[#f] if @scheme[v] is not an instance of a
@tech{prefab} structure type. Otherwise, the result is the shorted key @tech{prefab} structure type. Otherwise, the result is the shorted key

View File

@ -4,7 +4,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? false/c) [phase-level (or/c exact-integer? #f)
(syntax-local-phase-level)]) (syntax-local-phase-level)])
boolean?]{ boolean?]{
@ -16,7 +16,7 @@ suitable expression context at the @tech{phase level} indicated by
@defproc[(free-identifier=? [a-id syntax?][b-id syntax?] @defproc[(free-identifier=? [a-id syntax?][b-id syntax?]
[phase-level (or/c exact-integer? false/c) [phase-level (or/c exact-integer? #f)
(syntax-local-phase-level)]) (syntax-local-phase-level)])
boolean?]{ boolean?]{
@ -46,7 +46,7 @@ Same as @scheme[(free-identifier=? a-id b-id #f)].}
@defproc[(check-duplicate-identifier [ids (listof identifier?)]) @defproc[(check-duplicate-identifier [ids (listof identifier?)])
(or/c identifier? false/c)]{ (or/c identifier? #f)]{
Compares each identifier in @scheme[ids] with every other identifier Compares each identifier in @scheme[ids] with every other identifier
in the list with @scheme[bound-identifier=?]. If any comparison in the list with @scheme[bound-identifier=?]. If any comparison
@ -56,16 +56,17 @@ is @scheme[#f].}
@defproc[(identifier-binding [id-stx syntax?] @defproc[(identifier-binding [id-stx syntax?]
[phase-level (or/c exact-integer? false/c) [phase-level (or/c exact-integer? #f)
(syntax-local-phase-level)]) (syntax-local-phase-level)])
(or/c (one-of 'lexical #f) (or/c 'lexical
#f
(listof module-path-index? (listof module-path-index?
symbol? symbol?
module-path-index? module-path-index?
symbol? symbol?
(one-of/c 0 1) (or/c 0 1)
(or/c exact-integer? false/c) (or/c exact-integer? #f)
(or/c exact-integer? false/c)))]{ (or/c exact-integer? #f)))]{
Returns one of three kinds of values, depending on the binding of Returns one of three kinds of values, depending on the binding of
@scheme[id-stx] at the @tech{phase level} indicated by @scheme[id-stx] at the @tech{phase level} indicated by
@ -132,40 +133,43 @@ Returns one of three kinds of values, depending on the binding of
}} }}
@defproc[(identifier-transformer-binding [id-stx syntax?]) @defproc[(identifier-transformer-binding [id-stx syntax?])
(or/c (one-of 'lexical #f) (or/c 'lexical
#f
(listof module-path-index? (listof module-path-index?
symbol? symbol?
module-path-index? module-path-index?
symbol? symbol?
(one-of/c 0 1) (or/c 0 1)
(or/c exact-integer? false/c) (or/c exact-integer? #f)
(or/c exact-integer? false/c)))]{ (or/c exact-integer? #f)))]{
Same as @scheme[(identifier-binding id-stx (add1 (syntax-local-phase-level)))].} Same as @scheme[(identifier-binding id-stx (add1 (syntax-local-phase-level)))].}
@defproc[(identifier-template-binding [id-stx syntax?]) @defproc[(identifier-template-binding [id-stx syntax?])
(or/c (one-of 'lexical #f) (or/c 'lexical
#f
(listof module-path-index? (listof module-path-index?
symbol? symbol?
module-path-index? module-path-index?
symbol? symbol?
(one-of/c 0 1) (or/c 0 1)
(or/c exact-integer? false/c) (or/c exact-integer? #f)
(or/c exact-integer? false/c)))]{ (or/c exact-integer? #f)))]{
Same as @scheme[(identifier-binding id-stx (sub1 (syntax-local-phase-level)))].} Same as @scheme[(identifier-binding id-stx (sub1 (syntax-local-phase-level)))].}
@defproc[(identifier-label-binding [id-stx syntax?]) @defproc[(identifier-label-binding [id-stx syntax?])
(or/c (one-of 'lexical #f) (or/c 'lexical
#f
(listof module-path-index? (listof module-path-index?
symbol? symbol?
module-path-index? module-path-index?
symbol? symbol?
(one-of/c 0 1) (or/c 0 1)
(or/c exact-integer? false/c) (or/c exact-integer? #f)
(or/c exact-integer? false/c)))]{ (or/c exact-integer? #f)))]{
Same as @scheme[(identifier-binding id-stx #f)].} Same as @scheme[(identifier-binding id-stx #f)].}

View File

@ -19,8 +19,7 @@ object that is marshaled as part of compiled code; see also
@defproc[(syntax-line [stx syntax?]) @defproc[(syntax-line [stx syntax?])
(or/c exact-positive-integer? (or/c exact-positive-integer? #f)]{
false/c)]{
Returns the line number (positive exact integer) for the start of the Returns the line number (positive exact integer) for the start of the
@tech{syntax object} in its source, or @scheme[#f] if the line number or @tech{syntax object} in its source, or @scheme[#f] if the line number or
@ -31,8 +30,7 @@ about marshaling compiled @tech{syntax object}s.}
@defproc[(syntax-column [stx syntax?]) @defproc[(syntax-column [stx syntax?])
(or/c exact-nonnegative-integer? (or/c exact-nonnegative-integer? #f)]{
false/c)]{
Returns the column number (non-negative exact integer) for the start Returns the column number (non-negative exact integer) for the start
of the @tech{syntax object} in its source, or @scheme[#f] if the source of the @tech{syntax object} in its source, or @scheme[#f] if the source
@ -43,8 +41,7 @@ about marshaling compiled @tech{syntax object}s.}
@defproc[(syntax-position [stx syntax?]) @defproc[(syntax-position [stx syntax?])
(or/c exact-positive-integer? (or/c exact-positive-integer? #f)]{
false/c)]{
Returns the character position (positive exact integer) for the start Returns the character position (positive exact integer) for the start
of the @tech{syntax object} in its source, or @scheme[#f] if the source of the @tech{syntax object} in its source, or @scheme[#f] if the source
@ -54,8 +51,7 @@ position is unknown. See also @secref["linecol"], and see
@defproc[(syntax-span [stx syntax?]) @defproc[(syntax-span [stx syntax?])
(or/c exact-nonnegative-integer? (or/c exact-nonnegative-integer? #f)]{
false/c)]{
Returns the span (non-negative exact integer) in characters of the Returns the span (non-negative exact integer) in characters of the
@tech{syntax object} in its source, or @scheme[#f] if the span is @tech{syntax object} in its source, or @scheme[#f] if the span is
@ -77,7 +73,7 @@ opposed to @tech{syntax object}s inserted by macros.}
@defproc[(syntax-source-module [stx syntax?]) @defproc[(syntax-source-module [stx syntax?])
(or/c module-path-index? symbol? false/c)]{ (or/c module-path-index? symbol? #f)]{
Returns a module path index or symbol (see @secref["modpathidx"]) Returns a module path index or symbol (see @secref["modpathidx"])
for the module whose source contains @scheme[stx], or @scheme[#f] if for the module whose source contains @scheme[stx], or @scheme[#f] if
@ -120,7 +116,7 @@ source. See @secref["parse-pair"] for more information.}
@defproc[(syntax->list [stx syntax?]) @defproc[(syntax->list [stx syntax?])
(or/c list? false/c)]{ (or/c list? #f)]{
Returns a list of @tech{syntax object}s or @scheme[#f]. The result is a list Returns a list of @tech{syntax object}s or @scheme[#f]. The result is a list
of @tech{syntax object}s when @scheme[(syntax->datum stx)] would produce a of @tech{syntax object}s when @scheme[(syntax->datum stx)] would produce a
@ -140,21 +136,21 @@ The stripping operation does not mutate @scheme[stx]; it creates new
pairs, vectors, boxes, and @tech{prefab} structures as needed to strip lexical and pairs, vectors, boxes, and @tech{prefab} structures as needed to strip lexical and
source-location information recursively.} source-location information recursively.}
@defproc[(datum->syntax [ctxt (or/c syntax? false/c)] @defproc[(datum->syntax [ctxt (or/c syntax? #f)]
[v any/c] [v any/c]
[srcloc (or/c syntax? false/c [srcloc (or/c syntax? #f
(list/c any/c (list/c any/c
(or/c exact-positive-integer? false/c) (or/c exact-positive-integer? #f)
(or/c exact-nonnegative-integer? false/c) (or/c exact-nonnegative-integer? #f)
(or/c exact-nonnegative-integer? false/c) (or/c exact-nonnegative-integer? #f)
(or/c exact-positive-integer? false/c)) (or/c exact-positive-integer? #f))
(vector/c any/c (vector/c any/c
(or/c exact-positive-integer? false/c) (or/c exact-positive-integer? #f)
(or/c exact-nonnegative-integer? false/c) (or/c exact-nonnegative-integer? #f)
(or/c exact-nonnegative-integer? false/c) (or/c exact-nonnegative-integer? #f)
(or/c exact-positive-integer? false/c)))] (or/c exact-positive-integer? #f)))]
[prop (or/c syntax? false/c) #f] [prop (or/c syntax? #f) #f]
[cert (or/c syntax? false/c) #f]) [cert (or/c syntax? #f) #f])
syntax?]{ syntax?]{
Converts the @tech{datum} @scheme[v] to a @tech{syntax object}. If Converts the @tech{datum} @scheme[v] to a @tech{syntax object}. If

View File

@ -83,13 +83,9 @@ create @scheme[transformer].}
@defproc[(local-expand [stx syntax?] @defproc[(local-expand [stx syntax?]
[context-v (or/c (one-of 'expression 'top-level 'module [context-v (or/c 'expression 'top-level 'module 'module-begin list?)]
'module-begin) [stop-ids (or/c (listof identifier?) #f)]
list?)] [intdef-ctx (or/c internal-definition-context? #f) #f])
[stop-ids (or/c (listof identifier?) false/c)]
[intdef-ctx (or/c internal-definition-context?
false/c)
#f])
syntax?]{ syntax?]{
Expands @scheme[stx] in the lexical context of the expression Expands @scheme[stx] in the lexical context of the expression
@ -149,13 +145,9 @@ avoids quadratic expansion times when local expansions are nested.
@defproc[(local-transformer-expand [stx syntax?] @defproc[(local-transformer-expand [stx syntax?]
[context-v (or/c (one-of 'expression 'top-level 'module [context-v (or/c 'expression 'top-level 'module 'module-begin list?)]
'module-begin) [stop-ids (or/c (listof identifier?) #f)]
list?)] [intdef-ctx (or/c internal-definition-context? #f) #f])
[stop-ids (or/c (listof identifier?) false/c)]
[intdef-ctx (or/c internal-definition-context?
false/c)
#f])
syntax?]{ syntax?]{
Like @scheme[local-expand], but @scheme[stx] is expanded as a Like @scheme[local-expand], but @scheme[stx] is expanded as a
@ -163,13 +155,9 @@ transformer expression instead of a run-time expression.}
@defproc[(local-expand/capture-lifts [stx syntax?] @defproc[(local-expand/capture-lifts [stx syntax?]
[context-v (or/c (one-of 'expression 'top-level 'module [context-v (or/c 'expression 'top-level 'module 'module-begin list?)]
'module-begin) [stop-ids (or/c (listof identifier?) #f)]
list?)] [intdef-ctx (or/c internal-definition-context? #f) #f]
[stop-ids (or/c (listof identifier?) false/c)]
[intdef-ctx (or/c internal-definition-context?
false/c)
#f]
[lift-ctx any/c (gensym 'lifts)]) [lift-ctx any/c (gensym 'lifts)])
syntax?]{ syntax?]{
@ -185,13 +173,9 @@ expressions are not expanded, but instead left as provided in the
@defproc[(local-transformer-expand/capture-lifts [stx syntax?] @defproc[(local-transformer-expand/capture-lifts [stx syntax?]
[context-v (or/c (one-of 'expression 'top-level 'module [context-v (or/c 'expression 'top-level 'module 'module-begin list?)]
'module-begin) [stop-ids (or/c (listof identifier?) #f)]
list?)] [intdef-ctx (or/c internal-definition-context? #f) #f])
[stop-ids (or/c (listof identifier?) false/c)]
[intdef-ctx (or/c internal-definition-context?
false/c)
#f])
syntax?]{ syntax?]{
Like @scheme[local-expand/capture-lifts], but @scheme[stx] is expanded Like @scheme[local-expand/capture-lifts], but @scheme[stx] is expanded
@ -214,7 +198,7 @@ or @scheme[define-syntaxes] form, use
@defproc[(syntax-local-bind-syntaxes [id-list (listof identifier?)] @defproc[(syntax-local-bind-syntaxes [id-list (listof identifier?)]
[expr (or/c syntax? false/c)] [expr (or/c syntax? #f)]
[intdef-ctx internal-definition-context?]) [intdef-ctx internal-definition-context?])
void?]{ void?]{
@ -233,10 +217,10 @@ match the number of identifiers, otherwise the
@defproc[(syntax-local-value [id-stx syntax?] @defproc[(syntax-local-value [id-stx syntax?]
[failure-thunk (or/c (-> any) false/c) [failure-thunk (or/c (-> any) #f)
#f] #f]
[intdef-ctx (or/c internal-definition-context? [intdef-ctx (or/c internal-definition-context?
false/c) #f)
#f]) #f])
any]{ any]{
@ -324,7 +308,7 @@ eventually expanded in an expression context.
@transform-time[]} @transform-time[]}
@defproc[(syntax-local-name) (or/c symbol? false/c)]{ @defproc[(syntax-local-name) (or/c symbol? #f)]{
Returns an inferred name for the expression position being Returns an inferred name for the expression position being
transformed, or @scheme[#f] if no such name is available. See also transformed, or @scheme[#f] if no such name is available. See also
@ -334,8 +318,7 @@ transformed, or @scheme[#f] if no such name is available. See also
@defproc[(syntax-local-context) @defproc[(syntax-local-context)
(or/c (one-of 'expression 'top-level 'module 'module-begin) (or/c 'expression 'top-level 'module 'module-begin list?)]{
list?)]{
Returns an indication of the context for expansion that triggered a Returns an indication of the context for expansion that triggered a
@tech{syntax transformer} call. See @secref["expand-context-model"] @tech{syntax transformer} call. See @secref["expand-context-model"]
@ -358,7 +341,7 @@ contexts.
@transform-time[]} @transform-time[]}
@defproc[(syntax-local-phase-level) (or/c exact-integer? false/c)]{ @defproc[(syntax-local-phase-level) (or/c exact-integer? #f)]{
During the dynamic extent of a @tech{syntax transformer} application During the dynamic extent of a @tech{syntax transformer} application
by the expander, the result is the @tech{phase level} of the form by the expander, the result is the @tech{phase level} of the form
@ -403,7 +386,7 @@ and a module-contextless version of @scheme[id-stx] otherwise.
@defproc[(syntax-local-certifier [active? boolean? #f]) @defproc[(syntax-local-certifier [active? boolean? #f])
((syntax?) (any/c (or/c procedure? false/c)) ((syntax?) (any/c (or/c procedure? #f))
. ->* . syntax?)]{ . ->* . syntax?)]{
Returns a procedure that captures any certificates currently available Returns a procedure that captures any certificates currently available
@ -482,9 +465,9 @@ for-syntax) definitions.}
@defproc[(syntax-local-module-required-identifiers @defproc[(syntax-local-module-required-identifiers
[mod-path (or/c module-path? false/c)] [mod-path (or/c module-path? #f)]
[phase-level (or/c exact-integer? false/c (one-of/c #t))]) [phase-level (or/c exact-integer? #f #t)])
(listof (cons/c (or/c exact-integer? false/c) (listof (cons/c (or/c exact-integer? #f)
(listof identifier?)))]{ (listof identifier?)))]{
Can be called only while Can be called only while
@ -566,9 +549,9 @@ Returns @scheme[#t] if @scheme[v] has the
@defstruct[import ([local-id identifier?] @defstruct[import ([local-id identifier?]
[src-sym symbol?] [src-sym symbol?]
[src-mod-path module-path?] [src-mod-path module-path?]
[mode (or/c exact-integer? false/c)] [mode (or/c exact-integer? #f)]
[req-mode (or/c exact-integer? false/c)] [req-mode (or/c exact-integer? #f)]
[orig-mode (or/c exact-integer? false/c)] [orig-mode (or/c exact-integer? #f)]
[orig-stx syntax?])]{ [orig-stx syntax?])]{
A structure representing a single imported identifier: A structure representing a single imported identifier:
@ -602,7 +585,7 @@ A structure representing a single imported identifier:
@defstruct[import-source ([mod-path-stx (and/c syntax? @defstruct[import-source ([mod-path-stx (and/c syntax?
(lambda (x) (lambda (x)
(module-path? (syntax->datum x))))] (module-path? (syntax->datum x))))]
[mode (or/c exact-integer? false/c)])]{ [mode (or/c exact-integer? #f)])]{
A structure representing an imported module, which must be A structure representing an imported module, which must be
@tech{instantiate}d or @tech{visit}ed even if no binding is imported @tech{instantiate}d or @tech{visit}ed even if no binding is imported
@ -619,7 +602,7 @@ into a module.
@defproc[(syntax-local-require-certifier) @defproc[(syntax-local-require-certifier)
((syntax?) (or/c false/c (syntax? . -> . syntax?)) ((syntax?) (or/c #f (syntax? . -> . syntax?))
. ->* . syntax?)]{ . ->* . syntax?)]{
Like @scheme[syntax-local-certifier], but to certify @tech{syntax Like @scheme[syntax-local-certifier], but to certify @tech{syntax
@ -652,7 +635,7 @@ See also @scheme[define-provide-syntax], which supports macro-style
@scheme[provide] transformers. @scheme[provide] transformers.
@defproc[(expand-export [stx syntax?] [modes (listof (or/c exact-integer? false/c))]) @defproc[(expand-export [stx syntax?] [modes (listof (or/c exact-integer? #f))])
(listof export?)]{ (listof export?)]{
Expands the given @scheme[_provide-spec] to a list of exports. The Expands the given @scheme[_provide-spec] to a list of exports. The
@ -663,7 +646,7 @@ otherwise. Normally, @scheme[modes] is either empty or contains a
single element.} single element.}
@defproc[(make-provide-transformer [proc (syntax? (listof (or/c exact-integer? false/c)) @defproc[(make-provide-transformer [proc (syntax? (listof (or/c exact-integer? #f))
. -> . (listof export?))]) . -> . (listof export?))])
provide-transformer?]{ provide-transformer?]{
@ -687,7 +670,7 @@ Returns @scheme[#t] if @scheme[v] has the
@defstruct[export ([local-id identifier?] @defstruct[export ([local-id identifier?]
[out-sym symbol?] [out-sym symbol?]
[mode (or/c exact-integer? false/c)] [mode (or/c exact-integer? #f)]
[protect? any/c] [protect? any/c]
[orig-stx syntax?])]{ [orig-stx syntax?])]{
@ -713,7 +696,7 @@ A structure representing a single imported identifier:
@defproc[(syntax-local-provide-certifier) @defproc[(syntax-local-provide-certifier)
((syntax?) (or/c false/c (syntax? . -> . syntax?)) ((syntax?) (or/c #f (syntax? . -> . syntax?))
. ->* . syntax?)]{ . ->* . syntax?)]{
Like @scheme[syntax-local-certifier], but to certify @tech{syntax Like @scheme[syntax-local-certifier], but to certify @tech{syntax

View File

@ -4,25 +4,25 @@
@title[#:tag "subprocess"]{Processes} @title[#:tag "subprocess"]{Processes}
@defproc*[([(subprocess [stdout (or/c output-port? false/c)] @defproc*[([(subprocess [stdout (or/c (and/c output-port? file-stream-port?) #f)]
[stdin (or/c input-port? false/c)] [stdin (or/c (and/c input-port? file-stream-port?) #f)]
[stderr (or/c output-port? false/c)] [stderr (or/c (and/c output-port? file-stream-port?) #f)]
[command path-string?] [command path-string?]
[arg string?] ...) [arg string?] ...)
(values subprocess? (values subprocess?
(or/c input-port? false/c) (or/c (and/c input-port? file-stream-port?) #f)
(or/c output-port? false/c) (or/c (and/c output-port? file-stream-port?) #f)
(or/c input-port? false/c))] (or/c (and/c input-port? file-stream-port?) #f))]
[(subprocess [stdout (or/c output-port? false/c)] [(subprocess [stdout (or/c (and/c output-port? file-stream-port?) #f)]
[stdin (or/c input-port? false/c)] [stdin (or/c (and/c input-port? file-stream-port?) #f)]
[stderr (or/c output-port? false/c)] [stderr (or/c (and/c output-port? file-stream-port?) #f)]
[command path-string?] [command path-string?]
[exact (one-of/c 'exact)] [exact 'exact]
[arg string?]) [arg string?])
(values subprocess? (values subprocess?
(or/c input-port? false/c) (or/c (and/c input-port? file-stream-port?) #f)
(or/c output-port? false/c) (or/c (and/c output-port? file-stream-port?) #f)
(or/c input-port? false/c))])]{ (or/c (and/c input-port? file-stream-port?) #f))])]{
Creates a new process in the underlying operating system to execute Creates a new process in the underlying operating system to execute
@scheme[command] asynchronously. See also @scheme[system] and @scheme[command] asynchronously. See also @scheme[system] and
@ -89,7 +89,7 @@ Blocks until the process represented by @scheme[subproc] terminates.}
@defproc[(subprocess-status [subproc subprocess?]) @defproc[(subprocess-status [subproc subprocess?])
(or/c (one-of/c 'running) (or/c 'running
exact-nonnegative-integer?)]{ exact-nonnegative-integer?)]{
Returns @indexed-scheme['running] if the process represented by Returns @indexed-scheme['running] if the process represented by
@ -124,9 +124,9 @@ Returns @scheme[#t] if @scheme[v] is a subprocess value, @scheme[#f]
otherwise.} otherwise.}
@defproc[(shell-execute [verb (or/c string? false/c)] @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?])
false/c] #f]
@index['("ShellExecute")]{Performs} the action specified by @scheme[verb] @index['("ShellExecute")]{Performs} the action specified by @scheme[verb]
on @scheme[target] in Windows. For platforms other than Windows, the on @scheme[target] in Windows. For platforms other than Windows, the
@ -236,7 +236,7 @@ value is @scheme[#t], @scheme[#f] otherwise.}
@defproc*[([(system* [command path-string?][arg string?] ...) boolean?] @defproc*[([(system* [command path-string?][arg string?] ...) boolean?]
[(system* [command path-string?][exact (one-of/c 'exact)][arg string?]) boolean?])]{ [(system* [command path-string?][exact 'exact][arg string?]) boolean?])]{
Like @scheme[system], except that @scheme[command] is a filename that Like @scheme[system], except that @scheme[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
@ -256,7 +256,7 @@ by the subprocess. A @scheme[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 (one-of/c 'exact)][arg string?]) (integer-in 0 255)])]{ [(system*/exit-code [command path-string?][exact 'exact][arg string?]) (integer-in 0 255)])]{
Like @scheme[system*], but returns the exit code like Like @scheme[system*], but returns the exit code like
@scheme[system/exit-code].} @scheme[system/exit-code].}
@ -267,7 +267,7 @@ Like @scheme[system*], but returns the exit code like
output-port? output-port?
exact-nonnegative-integer? exact-nonnegative-integer?
input-port? input-port?
((one-of/c 'status 'wait 'interrupt 'kill) . -> . any))]{ ((or/c 'status 'wait 'interrupt 'kill) . -> . any))]{
Executes a shell command asynchronously. The result is a list of five values: Executes a shell command asynchronously. The result is a list of five values:
@ -313,7 +313,7 @@ be explicitly closed with @scheme[close-input-port] or
@defproc*[([(process* [command path-string?][arg string?] ...) list?] @defproc*[([(process* [command path-string?][arg string?] ...) list?]
[(process* [command path-string?][exact (one-of/c 'exact)][arg string?]) list?])]{ [(process* [command path-string?][exact 'exact][arg string?]) list?])]{
Like @scheme[process], except that @scheme[command] is a filename that Like @scheme[process], except that @scheme[command] is a filename that
is executed directly, and the @scheme[arg]s are the arguments. Under is executed directly, and the @scheme[arg]s are the arguments. Under
@ -321,9 +321,9 @@ Windows, as for @scheme[system*], the first @scheme[arg] can be
replaced with @scheme['exact].} replaced with @scheme['exact].}
@defproc[(process/ports [out (or/c false/c output-port?)] @defproc[(process/ports [out (or/c #f output-port?)]
[in (or/c false/c input-port?)] [in (or/c #f input-port?)]
[error-out (or/c false/c output-port?)] [error-out (or/c #f output-port?)]
[command string?]) [command string?])
list?]{ list?]{
@ -335,17 +335,17 @@ system pipe is created and returned, as in @scheme[process]. For each
port that is provided, no pipe is created, and the corresponding value port that is provided, no pipe is created, and the corresponding value
in the returned list is @scheme[#f].} in the returned list is @scheme[#f].}
@defproc*[([(process*/ports [out (or/c false/c output-port?)] @defproc*[([(process*/ports [out (or/c #f output-port?)]
[in (or/c false/c input-port?)] [in (or/c #f input-port?)]
[error-out (or/c false/c output-port?)] [error-out (or/c #f output-port?)]
[command path-string?] [command path-string?]
[arg string?] ...) [arg string?] ...)
list?] list?]
[(process*/ports [out (or/c false/c output-port?)] [(process*/ports [out (or/c #f output-port?)]
[in (or/c false/c input-port?)] [in (or/c #f input-port?)]
[error-out (or/c false/c output-port?)] [error-out (or/c #f output-port?)]
[command path-string?] [command path-string?]
[exact (one-of/c 'exact)] [exact 'exact]
[arg string?]) [arg string?])
list?])]{ list?])]{

View File

@ -102,7 +102,7 @@ manage @scheme[thd] (and none of its subordinates manages
@scheme[thd]), the @exnraise[exn:fail:contract], and the thread is not @scheme[thd]), the @exnraise[exn:fail:contract], and the thread is not
suspended.} suspended.}
@defproc[(thread-resume [thd thread?][benefactor (or/c thread? custodian? false/c) #f]) void?]{ @defproc[(thread-resume [thd thread?][benefactor (or/c thread? custodian? #f) #f]) void?]{
Resumes the execution of @scheme[thd] if it is suspended and has at Resumes the execution of @scheme[thd] if it is suspended and has at
least one custodian (possibly added through @scheme[benefactor], as least one custodian (possibly added through @scheme[benefactor], as
@ -233,7 +233,7 @@ asynchronous channel.
@margin-note/ref{See also @secref["async-channel"].} @margin-note/ref{See also @secref["async-channel"].}
@defproc[(thread-send [thd thread?] [v any/c] @defproc[(thread-send [thd thread?] [v any/c]
[fail-thunk (or/c (-> any) false/c) [fail-thunk (or/c (-> any) #f)
(lambda () (raise-mismatch-error ....))]) (lambda () (raise-mismatch-error ....))])
any]{ any]{

View File

@ -127,7 +127,7 @@ Converts a date to a string. The returned string contains the time of
day only if @scheme[time?]. See also @scheme[date-display-format].} day only if @scheme[time?]. See also @scheme[date-display-format].}
@defparam[date-display-format format (one-of/c 'american @defparam[date-display-format format (or/c 'american
'chinese 'chinese
'german 'german
'indian 'indian

View File

@ -688,9 +688,9 @@ that defines macro with @scheme[define-syntax].
@defproc[(unit-static-signatures [unit-identifier identifier?] @defproc[(unit-static-signatures [unit-identifier identifier?]
[err-syntax syntax?]) [err-syntax syntax?])
(values (list/c (cons/c (or/c symbol? false/c) (values (list/c (cons/c (or/c symbol? #f)
identifier?)) identifier?))
(list/c (cons/c (or/c symbol? false/c) (list/c (cons/c (or/c symbol? #f)
identifier?)))]{ identifier?)))]{
If @scheme[unit-identifier] is bound to static unit information via If @scheme[unit-identifier] is bound to static unit information via
@ -710,7 +710,7 @@ then the @exnraise[exn:fail:syntax]. In that case, the given
@defproc[(signature-members [sig-identifier identifier?] @defproc[(signature-members [sig-identifier identifier?]
[err-syntax syntax?]) [err-syntax syntax?])
(values (or/c identifier? false/c) (values (or/c identifier? #f)
(listof identifier?) (listof identifier?)
(listof identifier?) (listof identifier?)
(listof identifier?))]{ (listof identifier?))]{

View File

@ -189,8 +189,8 @@ A parameter that controls printing values in an alternate syntax. See
@defparam*[current-write-relative-directory path @defparam*[current-write-relative-directory path
(or/c (and/c path-string? complete-path?) false/c) (or/c (and/c path-string? complete-path?) #f)
(or/c (and/c path? complete-path?) false/c)]{ (or/c (and/c path? complete-path?) #f)]{
A parameter that is used when writing compiled code that contains A parameter that is used when writing compiled code that contains
pathname literals, including source-location pathnames for procedure pathname literals, including source-location pathnames for procedure

View File

@ -282,11 +282,11 @@ For backward compatibility, the default values for
@scheme[current-comment-color], etc.} @scheme[current-comment-color], etc.}
@defproc[(code-pict-bottom-line-pict [pict pict?]) @defproc[(code-pict-bottom-line-pict [pict pict?])
(or/c pict? false/c)]{ (or/c pict? #f)]{
The same as @scheme[pict-last], provided for backward compatibility.} The same as @scheme[pict-last], provided for backward compatibility.}
@defproc[(pict->code-pict [pict pict?] [bl-pict (or/c pict? false/c)]) pict?]{ @defproc[(pict->code-pict [pict pict?] [bl-pict (or/c pict? #f)]) pict?]{
Mainly for backward compatibility: returns @scheme[(if bl-pict Mainly for backward compatibility: returns @scheme[(if bl-pict
(use-last pict (or (pict-last bl-pict) bl-pict)))].} (use-last pict (or (pict-last bl-pict) bl-pict)))].}

View File

@ -72,8 +72,8 @@ information from a pict.
[ascent real?] [ascent real?]
[descent real?] [descent real?]
[children (listof child?)] [children (listof child?)]
[panbox (or/c false/c any/c)] [panbox (or/c #f any/c)]
[last (or/c false/c pict?)])]{ [last (or/c #f pict?)])]{
A @scheme[pict] structure is normally not created directly with A @scheme[pict] structure is normally not created directly with
@scheme[make-pict]. Instead, functions like @scheme[text], @scheme[make-pict]. Instead, functions like @scheme[text],
@ -200,15 +200,15 @@ and the ascent is the height.}
@defproc*[([(hline [w real?] [h real?] @defproc*[([(hline [w real?] [h real?]
[#:segment seg-length (or/c false/c real?) #f]) pict?] [#:segment seg-length (or/c #f real?) #f]) pict?]
[(vline [w real?] [h real?] [(vline [w real?] [h real?]
[#:segment seg-length (or/c false/c real?) #f]) pict?])]{ [#:segment seg-length (or/c #f real?) #f]) pict?])]{
Straight lines, centered within their bounding boxes.} Straight lines, centered within their bounding boxes.}
@defproc[(frame [pict pict?] @defproc[(frame [pict pict?]
[#:segment seg-length (or/c #f real?) #f] [#:segment seg-length (or/c #f real?) #f]
[#:color color (or/c false/c string? (is-a?/c color<%>)) #f] [#:color color (or/c #f string? (is-a?/c color<%>)) #f]
[#:line-width width (or/c #f real?) #f]) [#:line-width width (or/c #f real?) #f])
pict?]{ pict?]{
@ -285,8 +285,8 @@ argument for consistency with the other functions.}
[find-src (pict? pict-path? . -> . (values real? real?))] [find-src (pict? pict-path? . -> . (values real? real?))]
[dest pict-path?] [dest pict-path?]
[find-dest (pict? pict-path? . -> . (values real? real?))] [find-dest (pict? pict-path? . -> . (values real? real?))]
[#:line-width line-width (or/c false/c real?) #f] [#:line-width line-width (or/c #f real?) #f]
[#:color color (or/c false/c string? (is-a/c? color%)) #f] [#:color color (or/c #f string? (is-a/c? color%)) #f]
[#:under? under? any/c #f]) [#:under? under? any/c #f])
pict?] pict?]
[(pin-arrow-line [arrow-size real?] [pict pict?] [(pin-arrow-line [arrow-size real?] [pict pict?]
@ -294,8 +294,8 @@ argument for consistency with the other functions.}
[find-src (pict? pict-path? . -> . (values real? real?))] [find-src (pict? pict-path? . -> . (values real? real?))]
[dest pict-path?] [dest pict-path?]
[find-dest (pict? pict-path? . -> . (values real? real?))] [find-dest (pict? pict-path? . -> . (values real? real?))]
[#:line-width line-width (or/c false/c real?) #f] [#:line-width line-width (or/c #f real?) #f]
[#:color color (or/c false/c string? (is-a/c? color%)) #f] [#:color color (or/c #f string? (is-a/c? color%)) #f]
[#:under? under? any/c #f] [#:under? under? any/c #f]
[#:solid? solid? any/c #t]) [#:solid? solid? any/c #t])
pict?] pict?]
@ -304,8 +304,8 @@ argument for consistency with the other functions.}
[find-src (pict? pict-path? . -> . (values real? real?))] [find-src (pict? pict-path? . -> . (values real? real?))]
[dest pict-path?] [dest pict-path?]
[find-dest (pict? pict-path? . -> . (values real? real?))] [find-dest (pict? pict-path? . -> . (values real? real?))]
[#:line-width line-width (or/c false/c real?) #f] [#:line-width line-width (or/c #f real?) #f]
[#:color color (or/c false/c string? (is-a/c? color%)) #f] [#:color color (or/c #f string? (is-a/c? color%)) #f]
[#:under? under? any/c #f] [#:under? under? any/c #f]
[#:solid? solid? any/c #t]) [#:solid? solid? any/c #t])
pict?])]{ pict?])]{
@ -636,9 +636,9 @@ which case true means @scheme["gray"] and false means
@defproc[(standard-fish [w real?] @defproc[(standard-fish [w real?]
[h real?] [h real?]
[#:direction direction (one-of/c 'left 'right) 'left] [#:direction direction (or/c 'left 'right) 'left]
[#:color color (or/c string? (is-a?/c color%)) "blue"] [#:color color (or/c string? (is-a?/c color%)) "blue"]
[#:eye-color eye-color (or/c string? (is-a?/c color%) false/c) "black"] [#:eye-color eye-color (or/c string? (is-a?/c color%) #f) "black"]
[#:open-mouth open-mouth (or/c boolean? real?) #f]) [#:open-mouth open-mouth (or/c boolean? real?) #f])
pict?]{ pict?]{
@ -675,7 +675,7 @@ library provides functions for creating and placing cartoon-speech
balloons.} balloons.}
@defproc[(wrap-balloon [pict pict?] @defproc[(wrap-balloon [pict pict?]
[spike (one-of/c ('n 's 'e 'w 'ne 'se 'sw 'nw))] [spike (or/c 'n 's 'e 'w 'ne 'se 'sw 'nw)]
[dx real?] [dx real?]
[dy real?] [dy real?]
[color (or/c string? (is-a?/c color%)) balloon-color] [color (or/c string? (is-a?/c color%)) balloon-color]
@ -707,7 +707,7 @@ extract the location of the spike point. More typically, the
@scheme[pin-balloon] function is used to add a balloon to a pict.} @scheme[pin-balloon] function is used to add a balloon to a pict.}
@defproc[(pip-wrap-balloon [pict pict?] @defproc[(pip-wrap-balloon [pict pict?]
[spike (one-of/c ('n 's 'e 'w 'ne 'se 'sw 'nw))] [spike (or/c 'n 's 'e 'w 'ne 'se 'sw 'nw)]
[dx real?] [dx real?]
[dy real?] [dy real?]
[color (or/c string? (is-a?/c color%)) balloon-color] [color (or/c string? (is-a?/c color%)) balloon-color]
@ -743,7 +743,7 @@ The resulting pict has the same bounding box, descent, and ascent as
@defproc[(balloon [w real?] @defproc[(balloon [w real?]
[h real?] [h real?]
[corner-radius (and/c real? (not/c negative?))] [corner-radius (and/c real? (not/c negative?))]
[spike (one-of/c ('n 's 'e 'w 'ne 'se 'sw 'nw))] [spike (or/c 'n 's 'e 'w 'ne 'se 'sw 'nw)]
[dx real?] [dx real?]
[dy real?] [dy real?]
[color (or/c string? (is-a?/c color%)) balloon-color]) [color (or/c string? (is-a?/c color%)) balloon-color])
@ -803,8 +803,8 @@ follows:
}} }}
@defproc[(face* [eyebrow-kind (one-of/c 'none 'normal 'worried 'angry)] @defproc[(face* [eyebrow-kind (or/c 'none 'normal 'worried 'angry)]
[mouth-kind (one-of/c 'plain 'smaller 'narrow 'medium 'large [mouth-kind (or/c 'plain 'smaller 'narrow 'medium 'large
'huge 'grimace 'oh 'tongue)] 'huge 'grimace 'oh 'tongue)]
[frown? any/c] [frown? any/c]
[color (or/c string (is-a?/c color%))] [color (or/c string (is-a?/c color%))]
@ -941,7 +941,7 @@ exact numbers; the procedure is called with each number from 0 to
@section{Rendering} @section{Rendering}
@defparam[dc-for-text-size dc (or/c false/c (is-a?/c dc<%>))]{ @defparam[dc-for-text-size dc (or/c #f (is-a?/c dc<%>))]{
A parameter that is used to determine the @tech{bounding box} of picts A parameter that is used to determine the @tech{bounding box} of picts
created with @scheme[text]. created with @scheme[text].
@ -972,8 +972,8 @@ repeated calls to @scheme[draw-pict].}
@defproc[(show-pict [pict pict?] @defproc[(show-pict [pict pict?]
[w (or/c false/c exact-nonnegative-integer?) #f] [w (or/c #f exact-nonnegative-integer?) #f]
[h (or/c false/c exact-nonnegative-integer?) #f]) [h (or/c #f exact-nonnegative-integer?) #f])
void?]{ void?]{
Opens a frame that displays @scheme[pict]. The frame adds one method, Opens a frame that displays @scheme[pict]. The frame adds one method,

View File

@ -20,15 +20,15 @@
@section{Primary Slide Functions} @section{Primary Slide Functions}
@defproc[(slide [#:title title (or/c false/c string?) #f] @defproc[(slide [#:title title (or/c #f string?) #f]
[#:name name (or/c false/c string?) title] [#:name name (or/c #f string?) title]
[#:layout layout (one-of-/c 'auto 'center 'top 'tall) 'auto] [#:layout layout (or/c 'auto 'center 'top 'tall) 'auto]
[#:inset inset slide-inset? (make-slide-inset 0 0 0 0)] [#:inset inset slide-inset? (make-slide-inset 0 0 0 0)]
[#:timeout secs (or/c false/c real?) #f] [#:timeout secs (or/c #f real?) #f]
[#:condense? condense? any/c (and timeout #t)] [#:condense? condense? any/c (and timeout #t)]
[element (flat-rec-contract elem/c [element (flat-rec-contract elem/c
(or/c pict? (or/c pict?
(one-of/c 'next 'next! 'alts 'alts~ 'nothing) (or/c 'next 'next! 'alts 'alts~ 'nothing)
comment? comment?
(listof (listof elem/c))))] ...) (listof (listof elem/c))))] ...)
void?]{ void?]{
@ -102,7 +102,7 @@ The normal way to make serif text. Returns @scheme[(text str 'roman
Creates title text. Returns @scheme[((current-titlet) str)].} Creates title text. Returns @scheme[((current-titlet) str)].}
@defproc[(para [#:width width real? (current-para-width)] @defproc[(para [#:width width real? (current-para-width)]
[#:align align (one-of/c 'left 'center 'right) 'left] [#:align align (or/c 'left 'center 'right) 'left]
[#:fill? fill? any/c #t] [#:fill? fill? any/c #t]
[#:decode? decode? any/c #t] [#:decode? decode? any/c #t]
[element (flat-rec-contract elem/c [element (flat-rec-contract elem/c
@ -141,7 +141,7 @@ See the spacing between lines is determined by the
@defproc[(item [#:width width real? (current-para-width)] @defproc[(item [#:width width real? (current-para-width)]
[#:bullet blt pict? bullet] [#:bullet blt pict? bullet]
[#:align align (one-of/c 'left 'center 'right) 'left] [#:align align (or/c 'left 'center 'right) 'left]
[#:fill? fill? any/c #t] [#:fill? fill? any/c #t]
[#:decode? decode? any/c #t] [#:decode? decode? any/c #t]
[element (flat-rec-contract elem/c [element (flat-rec-contract elem/c
@ -157,7 +157,7 @@ paragraph.}
@defproc[(subitem [#:width width real? (current-para-width)] @defproc[(subitem [#:width width real? (current-para-width)]
[#:bullet blt pict? o-bullet] [#:bullet blt pict? o-bullet]
[#:align align (one-of/c 'left 'center 'right) 'left] [#:align align (or/c 'left 'center 'right) 'left]
[#:fill? fill? any/c #t] [#:fill? fill? any/c #t]
[#:decode? decode? any/c #t] [#:decode? decode? any/c #t]
[element (flat-rec-contract elem/c [element (flat-rec-contract elem/c
@ -188,7 +188,7 @@ display.}
@defproc[(make-outline [name (or/c symbol? (listof symbol?))] @defproc[(make-outline [name (or/c symbol? (listof symbol?))]
[title (or/c string? pict?)] [title (or/c string? pict?)]
[subitems (or/c false/c null? [subitems (or/c #f null?
(symbol? . -> . pict?))] (symbol? . -> . pict?))]
...) ...)
(symbol? . -> . void?)]{ (symbol? . -> . void?)]{
@ -306,7 +306,7 @@ argument.
@section{Constants and Layout Variables} @section{Constants and Layout Variables}
@defthing[gap-size (one-of/c 24)]{ @defthing[gap-size 24]{
A width commonly used for layout.} A width commonly used for layout.}
@ -418,7 +418,7 @@ Parameter used by the default @scheme[current-titlet] to colorize the
title. The default is @scheme["black"].} title. The default is @scheme["black"].}
@defparam[current-slide-assembler proc ((or/c string? false/c) @defparam[current-slide-assembler proc ((or/c string? #f)
exact-nonnegative-integer? exact-nonnegative-integer?
pict? pict?
. -> . . -> .
@ -574,7 +574,7 @@ of whether the name fo the last @scheme[id] name ends in @litchar{~}).
[width real?] [width real?]
[height real?] [height real?]
[condense? any/c] [condense? any/c]
[stop-after (or/c false/c exact-nonnegative-integer?) #f]) [stop-after (or/c #f exact-nonnegative-integer?) #f])
(listof pict?)]{ (listof pict?)]{
Executes the Slideshow program indicated by @scheme[path] in a fresh Executes the Slideshow program indicated by @scheme[path] in a fresh

View File

@ -136,7 +136,7 @@
[sharing (:or (:: "#" (make-uinteger digit10) "=") [sharing (:or (:: "#" (make-uinteger digit10) "=")
(:: "#" (make-uinteger digit10) "#"))] (:: "#" (make-uinteger digit10) "#"))]
[list-prefix (:or "" "#hash" "#hasheq" "#s" (:: "#" (:* digit10)))]) [list-prefix (:or "" "#hash" "#hasheq" "#hasheqv" "#s" (:: "#" (:* digit10)))])
(define-lex-trans make-num (define-lex-trans make-num
(syntax-rules () (syntax-rules ()