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:
parent
26130818f3
commit
077e5a4666
|
@ -22,8 +22,8 @@ Returns @scheme[#t] if @scheme[v] is the result of @scheme[ffi-lib],
|
|||
@declare-exporting[scribblings/foreign/unsafe-foreign]
|
||||
|
||||
|
||||
@defproc[(ffi-lib [path (or/c path-string? false/c)]
|
||||
[version (or/c string? (listof string?) false/c) #f]) any]{
|
||||
@defproc[(ffi-lib [path (or/c path-string? #f)]
|
||||
[version (or/c string? (listof string?) #f) #f]) any]{
|
||||
|
||||
Returns an foreign-library value. If @scheme[path] is a path, the
|
||||
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?)]
|
||||
[lib (or/c ffi-lib? path-string? false/c)]
|
||||
[lib (or/c ffi-lib? path-string? #f)]
|
||||
[type ctype?]
|
||||
[failure-thunk (or/c (-> any) false/c) #f])
|
||||
[failure-thunk (or/c (-> any) #f) #f])
|
||||
any]{
|
||||
|
||||
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?)]
|
||||
[lib (or/c ffi-lib? path-string? false/c)]
|
||||
[lib (or/c ffi-lib? path-string? #f)]
|
||||
[type ctype?]
|
||||
[new any/c])
|
||||
void?]{
|
||||
|
@ -109,7 +109,7 @@ interface, including Scheme callbacks.}
|
|||
|
||||
|
||||
@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?])
|
||||
(and/c (-> any)
|
||||
(any/c -> void?))]{
|
||||
|
@ -134,8 +134,8 @@ actually redirected through a parameter-like procedure created by
|
|||
binding and for the foreign object's name.}
|
||||
|
||||
@defproc[(ffi-obj-ref [objname (or/c string? bytes? symbol?)]
|
||||
[lib (or/c ffi-lib? path-string? false/c)]
|
||||
[failure-thunk (or/c (-> any) false/c) #f])
|
||||
[lib (or/c ffi-lib? path-string? #f)]
|
||||
[failure-thunk (or/c (-> any) #f) #f])
|
||||
any]{
|
||||
|
||||
Returns a pointer object for the specified foreign object. This
|
||||
|
|
|
@ -16,8 +16,8 @@ along with conversion functions to and from the existing types.
|
|||
@section{Type Constructors}
|
||||
|
||||
@defproc[(make-ctype [type ctype?]
|
||||
[scheme-to-c (or/c false/c (any/c . -> . any))]
|
||||
[c-to-scheme (or/c false/c (any/c . -> . any))])
|
||||
[scheme-to-c (or/c #f (any/c . -> . any))]
|
||||
[c-to-scheme (or/c #f (any/c . -> . any))])
|
||||
ctype?]{
|
||||
|
||||
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?)]
|
||||
[output-type ctype?]
|
||||
[#:abi abi (or/c symbol/c false/c) #f]
|
||||
[#:wrapper wrapper (or/c false/c
|
||||
(procedure? . -> . procedure?))
|
||||
[#:abi abi (or/c symbol/c #f) #f]
|
||||
[#:wrapper wrapper (or/c #f (procedure? . -> . procedure?))
|
||||
#f]
|
||||
[#:keep keep (or/c boolean? box? (any/c . -> . any/c))
|
||||
#t])
|
||||
|
|
|
@ -16,7 +16,7 @@ it exports the following procedures. If you find any of these useful,
|
|||
please let us know.
|
||||
|
||||
@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]{
|
||||
|
||||
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.}
|
||||
|
||||
|
||||
@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-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?]
|
||||
[abi (or/c symbol/c false/c) #f])
|
||||
[abi (or/c symbol/c #f) #f])
|
||||
any]{
|
||||
|
||||
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]
|
||||
[abi (or/c symbol/c false/c) #f])
|
||||
[abi (or/c symbol/c #f) #f])
|
||||
ffi-callback?]{
|
||||
|
||||
The symmetric counterpart of @scheme[ffi-call]. It receives a Scheme
|
||||
|
|
|
@ -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
|
||||
@litchar{#hash} (for an @scheme[equal?]-based table) or
|
||||
@litchar{#hasheq} (for an @scheme[eq?]-based table). A parenthesized
|
||||
sequence must immediately follow @litchar{#hash} or @litchar{#hasheq},
|
||||
where each element is a sequence is a dotted key--value pair. Literal
|
||||
hash tables are immutable, but they can be extended functionally
|
||||
(producing a new hash table without changing the old one) using
|
||||
@scheme[hash-set].
|
||||
@litchar{#hash} (for an @scheme[equal?]-based table),
|
||||
@litchar{#hasheq} (for an @scheme[eq?]-based table), or
|
||||
@litchar{#hasheqv} (for an @scheme[eqv?]-based table). A parenthesized
|
||||
sequence must immediately follow @litchar{#hash}, @litchar{#hasheq},
|
||||
or @litchar{#hasheqv}, where each element is a sequence is a dotted
|
||||
key--value pair. Literal hash tables are immutable, but they can be
|
||||
extended functionally (producing a new hash table without changing the
|
||||
old one) using @scheme[hash-set].
|
||||
|
||||
@examples[
|
||||
(define ht #hash(("apple" . red)
|
||||
|
@ -42,8 +43,9 @@ ht2
|
|||
|
||||
@refdetails/gory["parse-hashtable"]{the syntax of hash table literals}
|
||||
|
||||
A hash table can optionally retain its keys @defterm{weakly}, so each
|
||||
mapping is retained only so long as the key is retained elsewhere.
|
||||
A non-literal hash table can optionally retain its keys
|
||||
@defterm{weakly}, so each mapping is retained only so long as the key
|
||||
is retained elsewhere.
|
||||
|
||||
@examples[
|
||||
(define ht (make-weak-hasheq))
|
||||
|
|
|
@ -14,7 +14,7 @@ Returns @scheme[#t] if @scheme[v] is an asynchronous channel,
|
|||
@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?]{
|
||||
|
||||
Returns an asynchronous channel with a buffer limit of @scheme[limit]
|
||||
|
|
|
@ -199,7 +199,7 @@ string.
|
|||
@section{Bytes to/from Characters, Decoding and Encoding}
|
||||
|
||||
@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]
|
||||
[end exact-nonnegative-integer? (bytes-length bstr)])
|
||||
string?]{
|
||||
|
@ -214,7 +214,7 @@ string.
|
|||
valid UTF-8 encoding overall, then the @exnraise[exn:fail:contract].}
|
||||
|
||||
@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]
|
||||
[end exact-nonnegative-integer? (bytes-length bstr)])
|
||||
string?]{
|
||||
|
@ -227,7 +227,7 @@ string.
|
|||
encoding overall, then the @exnraise[exn:fail:contract].}
|
||||
|
||||
@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]
|
||||
[end exact-nonnegative-integer? (bytes-length bstr)])
|
||||
string?]{
|
||||
|
@ -240,7 +240,7 @@ string.
|
|||
operations.}
|
||||
|
||||
@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]
|
||||
[end exact-nonnegative-integer? (string-length str)])
|
||||
bytes?]{
|
||||
|
@ -250,7 +250,7 @@ string.
|
|||
the other operations.}
|
||||
|
||||
@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]
|
||||
[end exact-nonnegative-integer? (string-length str)])
|
||||
bytes?]{
|
||||
|
@ -263,7 +263,7 @@ string.
|
|||
then the @exnraise[exn:fail:contract].}
|
||||
|
||||
@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]
|
||||
[end exact-nonnegative-integer? (string-length str)])
|
||||
bytes?]{
|
||||
|
@ -286,7 +286,7 @@ string.
|
|||
generating the encoded 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]
|
||||
[end exact-nonnegative-integer? (bytes-length bstr)])
|
||||
exact-nonnegative-integer?]{
|
||||
|
@ -299,7 +299,7 @@ string.
|
|||
|
||||
@defproc[(bytes-utf-8-ref [bstr bytes?]
|
||||
[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]
|
||||
[end exact-nonnegative-integer? (bytes-length bstr)])
|
||||
char?]{
|
||||
|
@ -314,7 +314,7 @@ string.
|
|||
|
||||
@defproc[(bytes-utf-8-index [bstr bytes?]
|
||||
[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]
|
||||
[end exact-nonnegative-integer? (bytes-length bstr)])
|
||||
exact-nonnegative-integer?]{
|
||||
|
@ -425,14 +425,14 @@ Closes the given converter, so that it can no longer be used with
|
|||
[src-bstr bytes?]
|
||||
[src-start-pos exact-nonnegative-integer? 0]
|
||||
[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-end-pos (or/c exact-nonnegative-integer? false/c)
|
||||
[dest-end-pos (or/c exact-nonnegative-integer? #f)
|
||||
(and dest-bstr
|
||||
(bytes-length dest-bstr))])
|
||||
(values (or/c bytes? 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]
|
||||
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?]
|
||||
[dest-bstr (or/c bytes? false/c) #f]
|
||||
[dest-bstr (or/c bytes? #f) #f]
|
||||
[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
|
||||
(bytes-length dest-bstr))])
|
||||
(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
|
||||
procedure generates an ending sequence for the conversion (sometimes
|
||||
|
|
|
@ -1661,7 +1661,7 @@ not including fields whose names are local (i.e., declared with
|
|||
@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
|
||||
values of @scheme[struct-info]:
|
||||
|
@ -1685,7 +1685,7 @@ K%
|
|||
(listof symbol?)
|
||||
(any/c exact-nonnegative-integer? . -> . any/c)
|
||||
(any/c exact-nonnegative-integer? any/c . -> . any/c)
|
||||
(or/c class? false/c)
|
||||
(or/c class? #f)
|
||||
boolean?)]{
|
||||
|
||||
Returns seven values, analogous to the return
|
||||
|
|
|
@ -101,7 +101,7 @@ only when the marks are for the same continuation frame in
|
|||
elements to indicate the lack of a value.}
|
||||
|
||||
@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]
|
||||
[prompt-tag prompt-tag? (default-continuation-prompt-tag)])
|
||||
any]{
|
||||
|
|
|
@ -45,7 +45,7 @@ between the application and the current continuation.
|
|||
@defproc[(call-with-continuation-prompt
|
||||
[thunk (-> any)]
|
||||
[prompt-tag continuation-prompt-tag? (default-continuation-prompt-tag)]
|
||||
[handler (or/c procedure? false/c) #f])
|
||||
[handler (or/c procedure? #f) #f])
|
||||
any]{
|
||||
|
||||
Calls @scheme[thunk] with the current continuation extended by a
|
||||
|
|
|
@ -11,34 +11,34 @@ written.
|
|||
|
||||
@defproc[(make-input-port [name any/c]
|
||||
[read-in (bytes?
|
||||
. -> . (one-of/c exact-nonnegative-integer?
|
||||
. -> . (or/c exact-nonnegative-integer?
|
||||
eof-object?
|
||||
procedure?
|
||||
evt?))]
|
||||
[peek (bytes? exact-nonnegative-integer? (or/c evt? #f)
|
||||
. -> . (or/c exact-nonnegative-integer?
|
||||
eof-object?
|
||||
procedure?
|
||||
evt?))]
|
||||
[peek (bytes? exact-nonnegative-integer? (or/c evt? false/c)
|
||||
. -> . (one-of/c exact-nonnegative-integer?
|
||||
eof-object?
|
||||
procedure?
|
||||
evt?
|
||||
false/c))]
|
||||
evt?
|
||||
#f))]
|
||||
[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)
|
||||
false/c)
|
||||
#f)
|
||||
#f]
|
||||
[get-location (or/c
|
||||
(()
|
||||
. ->* .
|
||||
((or/c exact-positive-integer? false/c)
|
||||
(or/c exact-nonnegative-integer? false/c)
|
||||
(or/c exact-positive-integer? false/c)))
|
||||
false/c)
|
||||
((or/c exact-positive-integer? #f)
|
||||
(or/c exact-nonnegative-integer? #f)
|
||||
(or/c exact-positive-integer? #f)))
|
||||
#f)
|
||||
#f]
|
||||
[count-lines! (-> any) void]
|
||||
[init-position exact-positive-integer? 1]
|
||||
[buffer-mode (or/c (case-> ((one-of/c 'block 'none) . -> . any)
|
||||
(-> (one-of/c 'block 'none #f)))
|
||||
false/c)
|
||||
[buffer-mode (or/c (case-> ((or/c 'block 'none) . -> . any)
|
||||
(-> (or/c 'block 'none #f)))
|
||||
#f)
|
||||
#f])
|
||||
input-port?]{
|
||||
|
||||
|
@ -659,7 +659,7 @@ s
|
|||
boolean?
|
||||
. -> .
|
||||
(or/c exact-nonnegative-integer?
|
||||
false/c
|
||||
#f
|
||||
evt?))]
|
||||
[close (-> any)]
|
||||
[write-out-special (or/c (any/c boolean? boolean?
|
||||
|
@ -667,33 +667,33 @@ s
|
|||
(or/c any/c
|
||||
#f
|
||||
evt?))
|
||||
false/c)
|
||||
#f)
|
||||
#f]
|
||||
[get-write-evt (or/c
|
||||
(bytes? exact-nonnegative-integer?
|
||||
exact-nonnegative-integer?
|
||||
. -> .
|
||||
evt?)
|
||||
false/c)
|
||||
#f)
|
||||
#f]
|
||||
[get-write-special-evt (or/c
|
||||
(any/c . -> . evt?)
|
||||
false/c)
|
||||
#f)
|
||||
#f]
|
||||
[get-location (or/c
|
||||
(()
|
||||
. ->* .
|
||||
((or/c exact-positive-integer? false/c)
|
||||
(or/c exact-nonnegative-integer? false/c)
|
||||
(or/c exact-positive-integer? false/c)))
|
||||
false/c)
|
||||
((or/c exact-positive-integer? #f)
|
||||
(or/c exact-nonnegative-integer? #f)
|
||||
(or/c exact-positive-integer? #f)))
|
||||
#f)
|
||||
#f]
|
||||
[count-lines! (-> any) void]
|
||||
[init-position exact-positive-integer? 1]
|
||||
[buffer-mode (or/c (case->
|
||||
((one-of/c 'block 'line 'none) . -> . any)
|
||||
(-> (one-of/c 'block 'line 'none #f)))
|
||||
false/c)])
|
||||
((or/c 'block 'line 'none) . -> . any)
|
||||
(-> (or/c 'block 'line 'none #f)))
|
||||
#f)])
|
||||
output-port?]{
|
||||
|
||||
Creates an output port, which is immediately open for
|
||||
|
|
|
@ -75,7 +75,7 @@ to @scheme[#f] makes locale-sensitive operations locale-insensitive,
|
|||
which means using the Unicode mapping for case operations and using
|
||||
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
|
||||
procedures such as @scheme[string-locale-ci=?].
|
||||
|
|
|
@ -74,7 +74,7 @@ and its lexical context is not enriched before it is passed to the
|
|||
@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
|
||||
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}.}
|
||||
|
||||
|
||||
@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
|
||||
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].}
|
||||
|
||||
|
||||
@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
|
||||
handler} to load from a file that may have a compiled form. The
|
||||
|
|
|
@ -204,7 +204,7 @@ pseudo-randomly for the result; the
|
|||
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?] ...+)
|
||||
any]{
|
||||
|
||||
|
@ -228,7 +228,7 @@ either all @scheme[evt]s remain unchosen or the @scheme[exn:break]
|
|||
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?] ...+)
|
||||
any]{
|
||||
|
||||
|
|
|
@ -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
|
||||
message.}
|
||||
|
||||
@defproc[(raise-syntax-error [name (or/c symbol? false/c)]
|
||||
@defproc[(raise-syntax-error [name (or/c symbol? #f)]
|
||||
[message string?]
|
||||
[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]
|
||||
[line (or/c exact-positive-integer? false/c)]
|
||||
[column (or/c exact-nonnegative-integer? false/c)]
|
||||
[position (or/c exact-positive-integer? false/c)]
|
||||
[span (or/c exact-nonnegative-integer? false/c)])
|
||||
[line (or/c exact-positive-integer? #f)]
|
||||
[column (or/c exact-nonnegative-integer? #f)]
|
||||
[position (or/c exact-positive-integer? #f)]
|
||||
[span (or/c exact-nonnegative-integer? #f)])
|
||||
#:inspector #f]{
|
||||
|
||||
The fields of an @scheme[srcloc] instance are as follows:
|
||||
|
|
|
@ -14,7 +14,7 @@ the management of the current custodian (see
|
|||
@secref["custodians"]).
|
||||
|
||||
@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?]{
|
||||
|
||||
Opens the file specified by @scheme[path] for input. The
|
||||
|
@ -62,10 +62,10 @@ A @tech{path} value that is the @tech{cleanse}d version of
|
|||
@scheme[path] is used as the name of the opened port.}
|
||||
|
||||
@defproc[(open-output-file [path path-string?]
|
||||
[#:mode mode-flag (one-of/c 'binary 'text) 'binary]
|
||||
[#:exists exists-flag (one-of/c 'error 'append 'update 'can-update
|
||||
'replace 'truncate
|
||||
'must-truncate 'truncate/replace) 'error])
|
||||
[#:mode mode-flag (or/c 'binary 'text) 'binary]
|
||||
[#:exists exists-flag (or/c 'error 'append 'update 'can-update
|
||||
'replace 'truncate
|
||||
'must-truncate 'truncate/replace) 'error])
|
||||
output-port?]{
|
||||
|
||||
Opens the file specified by @scheme[path] for output. The
|
||||
|
@ -142,9 +142,9 @@ A @tech{path} value that is the @tech{cleanse}d version of
|
|||
@scheme[path] is used as the name of the opened port.}
|
||||
|
||||
@defproc[(open-input-output-file [path path-string?]
|
||||
[#:mode mode-flag (one-of/c 'binary 'text) 'binary]
|
||||
[#:exists exists-flag (one-of/c 'error 'append 'update
|
||||
'replace 'truncate 'truncate/replace) 'error])
|
||||
[#:mode mode-flag (or/c 'binary 'text) 'binary]
|
||||
[#:exists exists-flag (or/c 'error 'append 'update
|
||||
'replace 'truncate 'truncate/replace) 'error])
|
||||
(values input-port? output-port?)]{
|
||||
|
||||
Like @scheme[open-output-file], but producing two values: an input
|
||||
|
@ -160,7 +160,7 @@ to avoid confusion.}
|
|||
|
||||
@defproc[(call-with-input-file [path path-string?]
|
||||
[proc (input-port? . -> . any)]
|
||||
[#:mode mode-flag (one-of/c 'binary 'text) 'binary])
|
||||
[#:mode mode-flag (or/c 'binary 'text) 'binary])
|
||||
any]{
|
||||
Calls @scheme[open-input-port] with the @scheme[path] and
|
||||
@scheme[mode-flag] arguments, and passes the resulting port
|
||||
|
@ -170,9 +170,9 @@ when @scheme[thunk] return.}
|
|||
|
||||
@defproc[(call-with-output-file [path path-string?]
|
||||
[proc (output-port? . -> . any)]
|
||||
[#:mode mode-flag (one-of/c 'binary 'text) 'binary]
|
||||
[#:exists exists-flag (one-of/c 'error 'append 'update
|
||||
'replace 'truncate 'truncate/replace) 'error])
|
||||
[#:mode mode-flag (or/c 'binary 'text) 'binary]
|
||||
[#:exists exists-flag (or/c 'error 'append 'update
|
||||
'replace 'truncate 'truncate/replace) 'error])
|
||||
any]{
|
||||
Analogous to @scheme[call-with-input-file], but passing @scheme[path],
|
||||
@scheme[mode-flag] and @scheme[exists-flag] to
|
||||
|
@ -180,7 +180,7 @@ Analogous to @scheme[call-with-input-file], but passing @scheme[path],
|
|||
|
||||
@defproc[(call-with-input-file* [path path-string?]
|
||||
[proc (input-port? . -> . any)]
|
||||
[#:mode mode-flag (one-of/c 'binary 'text) 'binary])
|
||||
[#:mode mode-flag (or/c 'binary 'text) 'binary])
|
||||
any]{
|
||||
Like @scheme[call-with-input-file], but the newly opened port is
|
||||
closed whenever control escapes the the dynamic extent of the
|
||||
|
@ -189,9 +189,9 @@ return, a continuation application, or a prompt-based abort.}
|
|||
|
||||
@defproc[(call-with-output-file* [path path-string?]
|
||||
[proc (output-port? . -> . any)]
|
||||
[#:mode mode-flag (one-of/c 'binary 'text) 'binary]
|
||||
[#:exists exists-flag (one-of/c 'error 'append 'update
|
||||
'replace 'truncate 'truncate/replace) 'error])
|
||||
[#:mode mode-flag (or/c 'binary 'text) 'binary]
|
||||
[#:exists exists-flag (or/c 'error 'append 'update
|
||||
'replace 'truncate 'truncate/replace) 'error])
|
||||
any]{
|
||||
Like @scheme[call-with-output-file], but the newly opened port is
|
||||
closed whenever control escapes the the dynamic extent of the
|
||||
|
@ -200,7 +200,7 @@ return, a continuation application, or a prompt-based abort.}
|
|||
|
||||
@defproc[(with-input-from-file [path path-string?]
|
||||
[thunk (-> any)]
|
||||
[#:mode mode-flag (one-of/c 'binary 'text) 'binary])
|
||||
[#:mode mode-flag (or/c 'binary 'text) 'binary])
|
||||
any]{
|
||||
Like @scheme[call-with-input-file*], but instead of passing the newly
|
||||
opened port to the given procedure argument, the port is installed as
|
||||
|
@ -209,9 +209,9 @@ the current input port (see @scheme[current-input-port]) using
|
|||
|
||||
@defproc[(with-output-to-file [path path-string?]
|
||||
[thunk (-> any)]
|
||||
[#:mode mode-flag (one-of/c 'binary 'text) 'binary]
|
||||
[#:exists exists-flag (one-of/c 'error 'append 'update
|
||||
'replace 'truncate 'truncate/replace) 'error])
|
||||
[#:mode mode-flag (or/c 'binary 'text) 'binary]
|
||||
[#:exists exists-flag (or/c 'error 'append 'update
|
||||
'replace 'truncate 'truncate/replace) 'error])
|
||||
any]{
|
||||
Like @scheme[call-with-output-file*], but instead of passing the newly
|
||||
opened port to the given procedure argument, the port is installed as
|
||||
|
|
|
@ -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])
|
||||
(or/c path? false/c)]{
|
||||
(or/c path? #f)]{
|
||||
|
||||
Finds a path for the executable @scheme[program-sub], returning
|
||||
@scheme[#f] if the path cannot be found.
|
||||
|
@ -256,7 +256,7 @@ existing @scheme[new].}
|
|||
|
||||
|
||||
@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 ....)))])
|
||||
any]{
|
||||
|
||||
|
@ -556,7 +556,7 @@ deleted. If @scheme[path] is a directory, then
|
|||
directory in @scheme[path] before the directory is deleted.}
|
||||
|
||||
@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?)]{
|
||||
|
||||
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)
|
||||
(or/c procedure?
|
||||
((path? (one-of/c 'dir) any/c)
|
||||
((path? 'dir any/c)
|
||||
. -> . (values any/c 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])
|
||||
any]{
|
||||
|
||||
|
@ -670,8 +670,8 @@ directories as necessary.}
|
|||
|
||||
|
||||
@defproc[(make-temporary-file [template string? "mztmp~a"]
|
||||
[copy-from-filename (or/c path-string? false/c (one-of/c 'directory)) #f]
|
||||
[directory (or/c path-string? false/c) #f])
|
||||
[copy-from-filename (or/c path-string? #f 'directory) #f]
|
||||
[directory (or/c path-string? #f) #f])
|
||||
path?]{
|
||||
|
||||
Creates a new temporary file and returns a pathname string for the
|
||||
|
@ -705,7 +705,7 @@ needed.}
|
|||
@defproc[(get-preference [name symbol?]
|
||||
[failure-thunk (-> any) (lambda () #f)]
|
||||
[flush-mode any/c 'timestamp]
|
||||
[filename (or/c string-path? false/c) #f])
|
||||
[filename (or/c string-path? #f) #f])
|
||||
any]{
|
||||
|
||||
Extracts a preference value from the file designated by
|
||||
|
@ -742,7 +742,7 @@ system, see @scheme[preferences:get].}
|
|||
@defproc[(put-preferences [names (listof symbol?)]
|
||||
[vals list?]
|
||||
[locked-proc (path? . -> . any) (lambda (p) (error ....))]
|
||||
[filename (or/c false/c path-string?) #f])
|
||||
[filename (or/c #f path-string?) #f])
|
||||
void?]{
|
||||
|
||||
Installs a set of preference values and writes all current values to
|
||||
|
|
|
@ -259,7 +259,7 @@ above about concurrent modification.}
|
|||
|
||||
|
||||
@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
|
||||
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?]
|
||||
[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
|
||||
@scheme[hash] after the element indexed by @scheme[pos] (which is not
|
||||
|
|
|
@ -68,14 +68,14 @@ Returns @scheme[#t] if @scheme[v] is a @tech{logger}, @scheme[#f]
|
|||
otherwise.}
|
||||
|
||||
|
||||
@defproc[(make-logger [name (or/c symbol? false/c) #f]
|
||||
[parent (or/c logger? false/c) #f])
|
||||
@defproc[(make-logger [name (or/c symbol? #f) #f]
|
||||
[parent (or/c logger? #f) #f])
|
||||
logger?]{
|
||||
|
||||
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.}
|
||||
|
||||
|
@ -88,7 +88,7 @@ A @tech{parameter} that determines the @tech{current logger}.}
|
|||
@section{Logging Events}
|
||||
|
||||
@defproc[(log-message [logger logger?]
|
||||
[level (one-of/c 'fatal 'error 'warning 'info 'debug)]
|
||||
[level (or/c 'fatal 'error 'warning 'info 'debug)]
|
||||
[message string?]
|
||||
[data any/c])
|
||||
void?]{
|
||||
|
@ -104,7 +104,7 @@ receivers.}
|
|||
|
||||
|
||||
@defproc[(log-level? [logger logger?]
|
||||
[level (one-of/c 'fatal 'error 'warning 'info 'debug)])
|
||||
[level (or/c 'fatal 'error 'warning 'info 'debug)])
|
||||
boolean?]{
|
||||
|
||||
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.}
|
||||
|
||||
@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?]{
|
||||
|
||||
Creates a @tech{log receiver} to receive events of importance
|
||||
|
|
|
@ -55,8 +55,8 @@ the grammar for @scheme[_module-path] for @scheme[require],
|
|||
. -> .
|
||||
any)
|
||||
((or/c module-path? path?)
|
||||
(or/c false/c resolved-module-path?)
|
||||
(or/c false/c syntax?)
|
||||
(or/c #f resolved-module-path?)
|
||||
(or/c #f syntax?)
|
||||
boolean?
|
||||
. -> .
|
||||
resolved-module-path?))]{
|
||||
|
@ -128,7 +128,7 @@ tools (such as DrScheme) might call this resolver in this mode to
|
|||
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 @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?])
|
||||
(values (or/c module-path? false/c)
|
||||
(or/c module-path-index? resolved-module-path? false/c))]{
|
||||
(values (or/c module-path? #f)
|
||||
(or/c module-path-index? resolved-module-path? #f))]{
|
||||
|
||||
Returns two values: a module path, and a base @tech{module path index}
|
||||
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
|
||||
above).}
|
||||
|
||||
@defproc[(module-path-index-join [path (or/c module-path? false/c)]
|
||||
[mpi (or/c module-path-index? resolved-module-path? false/c)])
|
||||
@defproc[(module-path-index-join [path (or/c module-path? #f)]
|
||||
[mpi (or/c module-path-index? resolved-module-path? #f)])
|
||||
module-path-index?]{
|
||||
|
||||
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?])
|
||||
(listof (cons/c (or/c exact-integer? false/c)
|
||||
(listof (cons/c (or/c exact-integer? #f)
|
||||
(listof module-path-index?)))]{
|
||||
|
||||
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?])
|
||||
(values (listof (cons/c (or/c exact-integer? false/c) list?))
|
||||
(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? #f) list?)))]
|
||||
|
||||
Returns two association lists mapping @tech{phase level} values (where
|
||||
@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
|
||||
(or/c module-path-index?
|
||||
(list/c module-path-index?
|
||||
(or/c exact-integer? false/c)
|
||||
(or/c exact-integer? #f)
|
||||
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
|
||||
|
@ -294,7 +294,7 @@ name of the re-exported binding, and the @tech{phase level} of the
|
|||
import.}
|
||||
|
||||
@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
|
||||
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}
|
||||
|
||||
@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]{
|
||||
|
||||
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?]
|
||||
[provided (or/c symbol? false/c)])
|
||||
[provided (or/c symbol? #f)])
|
||||
any]{
|
||||
|
||||
Like @scheme[dynamic-require], but in @tech{phase} 1.}
|
||||
|
||||
|
||||
@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
|
||||
implementation of @scheme[mod], which must be declared (but not
|
||||
|
|
|
@ -132,37 +132,37 @@ Like @scheme[for-each], but for @tech{mutable lists}.}
|
|||
|
||||
|
||||
@defproc[(mmember [v any/c] [mlst mlist?])
|
||||
(or/c mlist? false/c)]{
|
||||
(or/c mlist? #f)]{
|
||||
|
||||
Like @scheme[member], but for @tech{mutable lists}.}
|
||||
|
||||
|
||||
@defproc[(mmemv [v any/c] [mlst mlist?])
|
||||
(or/c mlist? false/c)]{
|
||||
(or/c mlist? #f)]{
|
||||
|
||||
Like @scheme[memv], but for @tech{mutable lists}.}
|
||||
|
||||
|
||||
@defproc[(mmemq [v any/c] [mlst mlist?])
|
||||
(or/c list? false/c)]{
|
||||
(or/c list? #f)]{
|
||||
|
||||
Like @scheme[memq], but for @tech{mutable lists}.}
|
||||
|
||||
|
||||
@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.}
|
||||
|
||||
|
||||
@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.}
|
||||
|
||||
|
||||
@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.}
|
||||
|
||||
|
|
|
@ -105,7 +105,7 @@ no source location or properties.}
|
|||
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)])
|
||||
identifier?]{
|
||||
|
||||
|
@ -123,7 +123,7 @@ bindings.}
|
|||
|
||||
@defproc[(namespace-variable-value [sym symbol?]
|
||||
[use-mapping? any/c #t]
|
||||
[failure-thunk (or/c (-> any) false/c) #f]
|
||||
[failure-thunk (or/c (-> any) #f) #f]
|
||||
[namespace namespace? (current-namespace)])
|
||||
any]{
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ For information about TCP in general, see @italic{TCP/IP Illustrated,
|
|||
(integer-in 1 65535))]
|
||||
[max-allow-wait exact-nonnegative-integer? 4]
|
||||
[reuse? any/c #f]
|
||||
[hostname (or/c string? false/c) #f])
|
||||
[hostname (or/c string? #f) #f])
|
||||
tcp-listener?]
|
||||
|
||||
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?]
|
||||
[port-no (and/c exact-nonnegative-integer?
|
||||
(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?
|
||||
(integer-in 1 65535))
|
||||
false/c)
|
||||
#f)
|
||||
#f])
|
||||
(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?]
|
||||
[port-no (and/c exact-nonnegative-integer?
|
||||
(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?
|
||||
(integer-in 1 65535))
|
||||
false/c)])
|
||||
#f)])
|
||||
(values input-port? output-port?)]{
|
||||
|
||||
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,
|
||||
Volume 1} by W. Richard Stevens.
|
||||
|
||||
@defproc[(udp-open-socket [family-hostname (or/c string? false/c) #f]
|
||||
[family-port-no (or/c string? false/c) #f])
|
||||
@defproc[(udp-open-socket [family-hostname (or/c string? #f) #f]
|
||||
[family-port-no (or/c string? #f) #f])
|
||||
udp?]{
|
||||
|
||||
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.}
|
||||
|
||||
@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?
|
||||
(integer-in 1 65535))])
|
||||
void?]{
|
||||
|
@ -318,10 +318,10 @@ If @scheme[udp-socket] is already bound or closed, the
|
|||
|
||||
|
||||
@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?
|
||||
(integer-in 1 65535))
|
||||
false/c)])
|
||||
#f)])
|
||||
void?]{
|
||||
|
||||
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?))]
|
||||
[start-pos exact-nonnegative-integer? 0]
|
||||
[end-pos exact-nonnegative-integer? (bytes-length bstr)])
|
||||
(values (or/c exact-nonnegative-integer? false/c)
|
||||
(or/c string? false/c)
|
||||
(or/c (integer-in 1 65535) false/c))]{
|
||||
(values (or/c exact-nonnegative-integer? #f)
|
||||
(or/c string? #f)
|
||||
(or/c (integer-in 1 65535) #f))]{
|
||||
|
||||
Like @scheme[udp-receive!], except that it never blocks. If no
|
||||
datagram is available, the three result values are all @scheme[#f].}
|
||||
|
|
|
@ -687,7 +687,7 @@ generator.}
|
|||
@section-index["numbers" "converting"]
|
||||
|
||||
@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]
|
||||
in the base specific by @scheme[radix]. If @scheme[z] is inexact,
|
||||
@scheme[radix] must be @scheme[10], otherwise the
|
||||
|
@ -697,7 +697,7 @@ generator.}
|
|||
|
||||
|
||||
@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
|
||||
@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?]
|
||||
[size-n (one-of/c 2 4 8)]
|
||||
[size-n (or/c 2 4 8)]
|
||||
[signed? any/c]
|
||||
[big-endian? any/c (system-big-endian?)]
|
||||
[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?]
|
||||
[size-n (one-of/c 4 8)]
|
||||
[size-n (or/c 4 8)]
|
||||
[big-endian? any/c (system-big-endian?)]
|
||||
[dest-bstr (and/c bytes?
|
||||
(not/c immutable?))
|
||||
|
@ -838,7 +838,7 @@ diameter: @number->string[pi].}
|
|||
|
||||
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
|
||||
@math{1}.
|
||||
|
|
|
@ -376,7 +376,7 @@ By default, @scheme[extract-key] is applied to two list elements for
|
|||
@section{List Searching}
|
||||
|
||||
@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
|
||||
@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?])
|
||||
(or/c list? false/c)]{
|
||||
(or/c list? #f)]{
|
||||
|
||||
Like @scheme[member], but finds an element using @scheme[eqv?].}
|
||||
|
||||
|
||||
@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?].}
|
||||
|
||||
|
||||
@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
|
||||
@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?)])
|
||||
(or/c pair? false/c)]{
|
||||
(or/c pair? #f)]{
|
||||
|
||||
Locates the first element of @scheme[lst] whose @scheme[car] is
|
||||
@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?)])
|
||||
(or/c pair? false/c)]{
|
||||
(or/c pair? #f)]{
|
||||
|
||||
Like @scheme[assoc], but finds an element using @scheme[eqv?].}
|
||||
|
||||
|
||||
@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?].}
|
||||
|
||||
|
||||
@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
|
||||
@scheme[proc]; an element is found when @scheme[proc] applied to the
|
||||
|
|
|
@ -29,7 +29,7 @@ value originally associated with a parameter through
|
|||
reachable, even if the parameter is mutated.
|
||||
|
||||
@defproc[(make-parameter [v any/c]
|
||||
[guard (or/c (any/c . -> . any) false/c) #f])
|
||||
[guard (or/c (any/c . -> . any) #f) #f])
|
||||
parameter?]{
|
||||
|
||||
Returns a new parameter procedure. The value of the parameter is
|
||||
|
|
|
@ -68,7 +68,7 @@ used instead of @scheme[string->path] when a string represents a
|
|||
single path element.}
|
||||
|
||||
@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?]{
|
||||
|
||||
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?]
|
||||
[type (one-of/c 'unix 'windows) (system-path-convention-type)])
|
||||
[type (or/c 'unix 'windows) (system-path-convention-type)])
|
||||
path?]{
|
||||
|
||||
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?])
|
||||
(one-of 'unix 'windows)]{
|
||||
(or/c 'unix 'windows)]{
|
||||
|
||||
Accepts a path value (not a string) and returns its convention
|
||||
type.}
|
||||
|
||||
|
||||
@defproc[(system-path-convention-type)
|
||||
(one-of 'unix 'windows)]{
|
||||
(or/c 'unix 'windows)]{
|
||||
|
||||
Returns the path convention type of the current platform:
|
||||
@indexed-scheme['unix] for @|AllUnix|, @indexed-scheme['windows] for
|
||||
Windows.}
|
||||
|
||||
|
||||
@defproc[(build-path [base (or/c path-string?
|
||||
(one-of/c 'up 'same))]
|
||||
@defproc[(build-path [base (or/c path-string? 'up 'same)]
|
||||
[sub (or/c (and/c path-string?
|
||||
(not/c complete-path?))
|
||||
(one-of/c 'up 'same))] ...)
|
||||
(or/c 'up 'same))] ...)
|
||||
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?]
|
||||
[sub (or/c path-string?
|
||||
(one-of/c 'up 'same))] ...)
|
||||
[sub (or/c path-string? 'up 'same)] ...)
|
||||
path?]{
|
||||
|
||||
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?])
|
||||
(values (or/c path?
|
||||
(one-of/c 'relative #f))
|
||||
(or/c path?
|
||||
(one-of/c 'up 'same))
|
||||
(values (or/c path? 'relative #f)
|
||||
(or/c path? 'up 'same)
|
||||
boolean?)]{
|
||||
|
||||
Deconstructs @scheme[path] into a smaller path and an immediate
|
||||
|
@ -499,21 +495,21 @@ to the end.}
|
|||
@note-lib[scheme/path]
|
||||
|
||||
@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
|
||||
@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
|
||||
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]
|
||||
syntactically a directory path (see @scheme[split-path]), then then
|
||||
result is @scheme[#f].}
|
||||
|
||||
@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
|
||||
@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,
|
||||
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
|
||||
@scheme[path] is syntactically a directory, @scheme[#f] is returned.}
|
||||
|
|
|
@ -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]
|
||||
has no effect.}
|
||||
|
||||
@defproc*[([(file-stream-buffer-mode [port port?]) (one-of/c 'none 'line 'block #f)]
|
||||
[(file-stream-buffer-mode [port port?][mode (one-of/c 'none 'line 'block)]) void?])]{
|
||||
@defproc*[([(file-stream-buffer-mode [port port?]) (or/c 'none 'line 'block #f)]
|
||||
[(file-stream-buffer-mode [port port?][mode (or/c 'none 'line 'block)]) void?])]{
|
||||
|
||||
Gets or sets the buffer mode for @scheme[port], if
|
||||
possible. @tech{File-stream ports} support setting the buffer mode,
|
||||
|
|
|
@ -27,43 +27,43 @@ input ports as it becomes available.}
|
|||
@defproc[(make-input-port/read-to-peek
|
||||
[name any/c]
|
||||
[read-in (bytes?
|
||||
. -> . (one-of/c exact-nonnegative-integer?
|
||||
eof-object?
|
||||
procedure?
|
||||
evt?))]
|
||||
[fast-peek (or/c false/c
|
||||
. -> . (or/c exact-nonnegative-integer?
|
||||
eof-object?
|
||||
procedure?
|
||||
evt?))]
|
||||
[fast-peek (or/c #f
|
||||
(bytes? exact-nonnegative-integer?
|
||||
(bytes? exact-nonnegative-integer?
|
||||
. -> . (one-of/c exact-nonnegative-integer?
|
||||
eof-object?
|
||||
procedure?
|
||||
evt?
|
||||
false/c))
|
||||
. -> . (one-of/c exact-nonnegative-integer?
|
||||
eof-object?
|
||||
procedure?
|
||||
evt?
|
||||
false/c)))]
|
||||
. -> . (or/c exact-nonnegative-integer?
|
||||
eof-object?
|
||||
procedure?
|
||||
evt?
|
||||
#f))
|
||||
. -> . (or/c exact-nonnegative-integer?
|
||||
eof-object?
|
||||
procedure?
|
||||
evt?
|
||||
#f)))]
|
||||
[close (-> any)]
|
||||
[get-location (or/c
|
||||
(->
|
||||
(values
|
||||
(or/c exact-positive-integer? false/c)
|
||||
(or/c exact-nonnegative-integer? false/c)
|
||||
(or/c exact-positive-integer? false/c)))
|
||||
false/c)
|
||||
(or/c exact-positive-integer? #f)
|
||||
(or/c exact-nonnegative-integer? #f)
|
||||
(or/c exact-positive-integer? #f)))
|
||||
#f)
|
||||
#f]
|
||||
[count-lines! (-> any) void]
|
||||
[init-position exact-positive-integer? 1]
|
||||
[buffer-mode (or/c (case-> ((one-of/c 'block 'none) . -> . any)
|
||||
(-> (one-of/c 'block 'none #f)))
|
||||
false/c)
|
||||
[buffer-mode (or/c (case-> ((or/c 'block 'none) . -> . any)
|
||||
(-> (or/c 'block 'none #f)))
|
||||
#f)
|
||||
#f]
|
||||
[buffering? any/c #f]
|
||||
[on-consume (or/c ((or/c exact-nonnegative-integer? eof-object?
|
||||
procedure? evt?)
|
||||
. -> . any)
|
||||
false/c)
|
||||
#f)
|
||||
#f])
|
||||
input-port?]{
|
||||
|
||||
|
@ -144,7 +144,7 @@ determine the names of the result ports.}
|
|||
|
||||
@defproc[(merge-input [a-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?]{
|
||||
|
||||
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?]
|
||||
[encoding string?]
|
||||
[error-bytes (or/c false/c bytes?)]
|
||||
[error-bytes (or/c #f bytes?)]
|
||||
[close? any/c #t]
|
||||
[name any/c (object-name in)]
|
||||
[convert-newlines? any/c #f]
|
||||
|
@ -230,10 +230,10 @@ incomplete encoding sequence.)}
|
|||
|
||||
@defproc[(reencode-output-port [out output-port?]
|
||||
[encoding string?]
|
||||
[error-bytes (or/c false/c bytes?)]
|
||||
[error-bytes (or/c #f bytes?)]
|
||||
[close? any/c #t]
|
||||
[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)
|
||||
(lambda (msg port) (error ...))])
|
||||
output-port?]{
|
||||
|
@ -297,8 +297,8 @@ the result port does not affect writing directly to @scheme[out].}
|
|||
|
||||
|
||||
@defproc[(relocate-input-port [in input-port?]
|
||||
[line (or/c exact-positive-integer? false/c)]
|
||||
[column (or/c exact-nonnegative-integer? false/c)]
|
||||
[line (or/c exact-positive-integer? #f)]
|
||||
[column (or/c exact-nonnegative-integer? #f)]
|
||||
[position exact-positive-integer?]
|
||||
[close? any/c #t])
|
||||
input-port?]{
|
||||
|
@ -327,8 +327,8 @@ the resulting port does not close @scheme[in].}
|
|||
|
||||
|
||||
@defproc[(relocate-output-port [out output-port?]
|
||||
[line (or/c exact-positive-integer? false/c)]
|
||||
[column (or/c exact-nonnegative-integer? false/c)]
|
||||
[line (or/c exact-positive-integer? #f)]
|
||||
[column (or/c exact-nonnegative-integer? #f)]
|
||||
[position exact-positive-integer?]
|
||||
[close? any/c #t])
|
||||
output-port?]{
|
||||
|
@ -340,10 +340,10 @@ Like @scheme[relocate-input-port], but for output ports.}
|
|||
[get-location (or/c
|
||||
(->
|
||||
(values
|
||||
(or/c exact-positive-integer? false/c)
|
||||
(or/c exact-nonnegative-integer? false/c)
|
||||
(or/c exact-positive-integer? false/c)))
|
||||
false/c)]
|
||||
(or/c exact-positive-integer? #f)
|
||||
(or/c exact-nonnegative-integer? #f)
|
||||
(or/c exact-positive-integer? #f)))
|
||||
#f)]
|
||||
[init-pos exact-positive-integer?]
|
||||
[close? any/c #t]
|
||||
[count-lines! (-> any) void])
|
||||
|
@ -363,10 +363,10 @@ is enabled for the resulting port. The default is @scheme[void].}
|
|||
[get-location (or/c
|
||||
(->
|
||||
(values
|
||||
(or/c exact-positive-integer? false/c)
|
||||
(or/c exact-nonnegative-integer? false/c)
|
||||
(or/c exact-positive-integer? false/c)))
|
||||
false/c)]
|
||||
(or/c exact-positive-integer? #f)
|
||||
(or/c exact-nonnegative-integer? #f)
|
||||
(or/c exact-positive-integer? #f)))
|
||||
#f)]
|
||||
[init-pos exact-positive-integer?]
|
||||
[close? any/c #t]
|
||||
[count-lines! (-> any) void])
|
||||
|
@ -455,7 +455,7 @@ a byte string.}
|
|||
|
||||
|
||||
@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?]{
|
||||
|
||||
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?]
|
||||
[mode (one-of 'linefeed 'return 'return-linefeed 'any 'any-one)])
|
||||
[mode (or/c 'linefeed 'return 'return-linefeed 'any 'any-one)])
|
||||
evt?]{
|
||||
|
||||
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?]
|
||||
[progress evt?][in input-port?]) evt?]
|
||||
[(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?]
|
||||
[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 [str (and/c string? (not/c immutable?))][in input-port?]) evt?])]{
|
||||
|
||||
|
|
|
@ -50,9 +50,9 @@ counting is automatically enabled for the port. Line counting cannot
|
|||
be disabled for a port after it is enabled.}
|
||||
|
||||
@defproc[(port-next-location [port port?])
|
||||
(values (or/c exact-positive-integer? false/c)
|
||||
(or/c exact-nonnegative-integer? false/c)
|
||||
(or/c exact-positive-integer? false/c))]{
|
||||
(values (or/c exact-positive-integer? #f)
|
||||
(or/c exact-nonnegative-integer? #f)
|
||||
(or/c exact-positive-integer? #f))]{
|
||||
|
||||
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
|
||||
|
|
|
@ -67,7 +67,7 @@ by @scheme[read-eval-print-loop].}
|
|||
|
||||
@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.
|
||||
|
||||
|
@ -76,7 +76,7 @@ is never broken into lines, and a newline is not added to the end of
|
|||
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
|
||||
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
|
||||
proc
|
||||
(any/c . -> . (or/c symbol? false/c))]{
|
||||
(any/c . -> . (or/c symbol? #f))]{
|
||||
|
||||
A parameter that controls remapping for styles. This procedure is
|
||||
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
|
||||
((or/c exact-nonnegative-integer? false/c)
|
||||
((or/c exact-nonnegative-integer? #f)
|
||||
output-port?
|
||||
exact-nonnegative-integer?
|
||||
(or/c exact-nonnegative-integer? (one-of/c 'infinity))
|
||||
(or/c exact-nonnegative-integer? 'infinity)
|
||||
. -> .
|
||||
exact-nonnegative-integer?)]{
|
||||
|
||||
|
@ -250,7 +250,7 @@ redirected to the port supplied to @scheme[pretty-print] or
|
|||
@defparam[pretty-print-size-hook proc
|
||||
(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.
|
||||
|
||||
|
|
|
@ -152,8 +152,7 @@ in @scheme[(procedure-arity proc)], the @exnraise[exn:fail:contract].
|
|||
@defproc[(procedure-keywords [proc procedure?])
|
||||
(values
|
||||
(listof keyword?)
|
||||
(or/c (listof keyword?)
|
||||
false/c))]{
|
||||
(or/c (listof keyword?) #f))]{
|
||||
|
||||
Returns information about the keyword arguments required and accepted
|
||||
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?]
|
||||
[required-kws (listof keyword?)]
|
||||
[allowed-kws (or/c (listof keyword?)
|
||||
false/c)])
|
||||
#f)])
|
||||
procedure?]{
|
||||
|
||||
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[#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
|
||||
@scheme[prop:procedure], and if the property value indicates a field
|
||||
|
|
|
@ -27,7 +27,7 @@ See @secref["reader"] for information on the default reader in
|
|||
@scheme[read-syntax] mode.}
|
||||
|
||||
@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)]
|
||||
[graph? any/c #f])
|
||||
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)]
|
||||
[in input-port? (current-input-port)]
|
||||
[start (or/c character? false/c) #f]
|
||||
[start (or/c character? #f) #f]
|
||||
[readtable readtable? (current-readtable)]
|
||||
[graph? any/c #f])
|
||||
any]{
|
||||
|
@ -238,7 +238,7 @@ a module-path datum following @litchar{#reader}. See
|
|||
@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
|
||||
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"]).}
|
||||
|
||||
@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)]
|
||||
[graph? any/c #f])
|
||||
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)]
|
||||
[in input-port? (current-input-port)]
|
||||
[start (or/c character? false/c) #f]
|
||||
[start (or/c character? #f) #f]
|
||||
[readtable readtable? (current-readtable)]
|
||||
[graph? any/c #f])
|
||||
any]{
|
||||
|
|
|
@ -69,10 +69,10 @@ otherwise.
|
|||
}
|
||||
|
||||
@defproc[(make-readtable [readtable readtable?]
|
||||
[key (or/c character? false/c)]
|
||||
[mode (or/c (one-of 'terminating-macro
|
||||
'non-terminating-macro
|
||||
'dispatch-macro)
|
||||
[key (or/c character? #f)]
|
||||
[mode (or/c (or/c 'terminating-macro
|
||||
'non-terminating-macro
|
||||
'dispatch-macro)
|
||||
character?)]
|
||||
[action (or/c procedure?
|
||||
readtable?)]
|
||||
|
@ -161,10 +161,10 @@ character to be treated as whitespace, and it might use
|
|||
|
||||
@defproc[(readtable-mapping [readtable readtable?][char character?])
|
||||
(values (or/c character?
|
||||
(one-of 'terminating-macro
|
||||
'non-terminating-macro))
|
||||
(or/c false/c procedure?)
|
||||
(or/c false/c procedure?))]{
|
||||
(or/c 'terminating-macro
|
||||
'non-terminating-macro))
|
||||
(or/c #f procedure?)
|
||||
(or/c #f procedure?))]{
|
||||
|
||||
Produces information about the mappings in @scheme[readtable] for
|
||||
@scheme[char]. The result is three values:
|
||||
|
|
|
@ -204,12 +204,12 @@ case-sensitively.
|
|||
@defproc[(regexp-match [pattern (or/c string? bytes? regexp? byte-regexp?)]
|
||||
[input (or/c string? bytes? input-port?)]
|
||||
[start-pos exact-nonnegative-integer? 0]
|
||||
[end-pos (or/c exact-nonnegative-integer? false/c) #f]
|
||||
[output-port (or/c output-port? false/c) #f])
|
||||
[end-pos (or/c exact-nonnegative-integer? #f) #f]
|
||||
[output-port (or/c output-port? #f) #f])
|
||||
(or/c (listof (or/c (cons (or/c string? bytes?)
|
||||
(or/c string? bytes?))
|
||||
false/c))
|
||||
false/c)]{
|
||||
#f))
|
||||
#f)]{
|
||||
|
||||
Attempts to match @scheme[pattern] (a string, byte string, regexp
|
||||
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?)]
|
||||
[input (or/c string? bytes? input-port?)]
|
||||
[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?))]{
|
||||
|
||||
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?)]
|
||||
[input input-port?]
|
||||
[start-pos exact-nonnegative-integer? 0]
|
||||
[end-pos (or/c exact-nonnegative-integer? false/c) #f]
|
||||
[output-port (or/c output-port? false/c) #f])
|
||||
[end-pos (or/c exact-nonnegative-integer? #f) #f]
|
||||
[output-port (or/c output-port? #f) #f])
|
||||
(or/c (listof (or/c (cons (or/c string? bytes?)
|
||||
(or/c string? bytes?))
|
||||
false/c))
|
||||
false/c)]{
|
||||
#f))
|
||||
#f)]{
|
||||
|
||||
Like @scheme[regexp-match] on input ports, except that if the match
|
||||
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?)]
|
||||
[input (or/c string? bytes? input-port?)]
|
||||
[start-pos exact-nonnegative-integer? 0]
|
||||
[end-pos (or/c exact-nonnegative-integer? false/c) #f]
|
||||
[output-port (or/c output-port? false/c) #f])
|
||||
[end-pos (or/c exact-nonnegative-integer? #f) #f]
|
||||
[output-port (or/c output-port? #f) #f])
|
||||
(or/c (listof (or/c (cons exact-nonnegative-integer?
|
||||
exact-nonnegative-integer?)
|
||||
false/c))
|
||||
false/c)]{
|
||||
#f))
|
||||
#f)]{
|
||||
|
||||
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
|
||||
|
@ -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?)]
|
||||
[input (or/c string? bytes? input-port?)]
|
||||
[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?
|
||||
exact-nonnegative-integer?))]{
|
||||
|
||||
|
@ -402,8 +402,8 @@ like @scheme[regexp-match*].
|
|||
@defproc[(regexp-match? [pattern (or/c string? bytes? regexp? byte-regexp?)]
|
||||
[input (or/c string? bytes? input-port?)]
|
||||
[start-pos exact-nonnegative-integer? 0]
|
||||
[end-pos (or/c exact-nonnegative-integer? false/c) #f]
|
||||
[output-port (or/c output-port? false/c) #f])
|
||||
[end-pos (or/c exact-nonnegative-integer? #f) #f]
|
||||
[output-port (or/c output-port? #f) #f])
|
||||
boolean?]{
|
||||
|
||||
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?)]
|
||||
[input input-port?]
|
||||
[start-pos exact-nonnegative-integer? 0]
|
||||
[end-pos (or/c exact-nonnegative-integer? false/c) #f]
|
||||
[progress (or/c evt false/c) #f])
|
||||
[end-pos (or/c exact-nonnegative-integer? #f) #f]
|
||||
[progress (or/c evt #f) #f])
|
||||
(or/c (listof (or/c (cons bytes? bytes?)
|
||||
false/c))
|
||||
false/c)]{
|
||||
#f))
|
||||
#f)]{
|
||||
|
||||
Like @scheme[regexp-match] on input ports, but only peeks bytes from
|
||||
@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?)]
|
||||
[input input-port?]
|
||||
[start-pos exact-nonnegative-integer? 0]
|
||||
[end-pos (or/c exact-nonnegative-integer? false/c) #f]
|
||||
[progress (or/c evt false/c) #f])
|
||||
[end-pos (or/c exact-nonnegative-integer? #f) #f]
|
||||
[progress (or/c evt #f) #f])
|
||||
(or/c (listof (or/c (cons exact-nonnegative-integer?
|
||||
exact-nonnegative-integer?)
|
||||
false/c))
|
||||
false/c)]{
|
||||
#f))
|
||||
#f)]{
|
||||
|
||||
Like @scheme[regexp-match-positions] on input ports, but only peeks
|
||||
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?)]
|
||||
[input input-port?]
|
||||
[start-pos exact-nonnegative-integer? 0]
|
||||
[end-pos (or/c exact-nonnegative-integer? false/c) #f]
|
||||
[progress (or/c evt false/c) #f])
|
||||
[end-pos (or/c exact-nonnegative-integer? #f) #f]
|
||||
[progress (or/c evt #f) #f])
|
||||
(or/c (listof (or/c (cons bytes? bytes?)
|
||||
false/c))
|
||||
false/c)]{
|
||||
#f))
|
||||
#f)]{
|
||||
|
||||
Like @scheme[regexp-match-peek], but it attempts to match only bytes
|
||||
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?)]
|
||||
[input input-port?]
|
||||
[start-pos exact-nonnegative-integer? 0]
|
||||
[end-pos (or/c exact-nonnegative-integer? false/c) #f]
|
||||
[progress (or/c evt false/c) #f])
|
||||
[end-pos (or/c exact-nonnegative-integer? #f) #f]
|
||||
[progress (or/c evt #f) #f])
|
||||
(or/c (listof (or/c (cons exact-nonnegative-integer?
|
||||
exact-nonnegative-integer?)
|
||||
false/c))
|
||||
false/c)]{
|
||||
#f))
|
||||
#f)]{
|
||||
|
||||
Like @scheme[regexp-match-peek-positions], but it attempts to match
|
||||
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?)]
|
||||
[input input-port?]
|
||||
[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?
|
||||
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?)]
|
||||
[input (or/c string? bytes? input-port?)]
|
||||
[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?))]{
|
||||
|
||||
The complement of @scheme[regexp-match*]: the result is a list of
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
@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
|
||||
@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[#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])
|
||||
(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.}
|
||||
|
||||
|
||||
@defproc[(system-library-subpath [mode (one-of 'cgc '3m #f)
|
||||
@defproc[(system-library-subpath [mode (or/c 'cgc '3m #f)
|
||||
(system-type 'gc)])
|
||||
path?]{
|
||||
|
||||
|
@ -131,7 +131,7 @@ otherwise platform-independent.}
|
|||
|
||||
@defproc[(vector-set-performance-stats! [results (and/c vector?
|
||||
(not/c immutable?))]
|
||||
[thd (or/c thread? false/c) #f])
|
||||
[thd (or/c thread? #f) #f])
|
||||
void?]{
|
||||
|
||||
Sets elements in @scheme[results] to report current performance
|
||||
|
|
|
@ -19,14 +19,14 @@ particular way and can have restricted resources (memory and time),
|
|||
filesystem access, and network access.
|
||||
|
||||
@defproc*[([(make-evaluator [language (or/c module-path?
|
||||
(list/c (one-of/c 'special) symbol?)
|
||||
(cons/c (one-of/c 'begin) list?))]
|
||||
(list/c 'special symbol?)
|
||||
(cons/c 'begin list?))]
|
||||
[input-program any/c] ...
|
||||
[#:requires requires (listof (or/c module-path? path?))]
|
||||
[#:allow-read allow (listof (or/c module-path? path?))])
|
||||
(any/c . -> . any)]
|
||||
[(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?))])
|
||||
(any/c . -> . any)])]{
|
||||
|
||||
|
@ -265,10 +265,10 @@ calls @scheme[read-syntax], accumulating results in a list until it
|
|||
receives @scheme[eof].}
|
||||
|
||||
|
||||
@defparam[sandbox-input in (or/c false/c
|
||||
@defparam[sandbox-input in (or/c #f
|
||||
string? bytes?
|
||||
input-port?
|
||||
(one-of/c 'pipe)
|
||||
'pipe
|
||||
(-> 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?
|
||||
(one-of/c 'pipe 'bytes 'string)
|
||||
'pipe
|
||||
'bytes
|
||||
'string
|
||||
(-> 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?
|
||||
(one-of/c 'pipe 'bytes 'string)
|
||||
'pipe
|
||||
'bytes
|
||||
'string
|
||||
(-> output-port?))]{
|
||||
|
||||
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
|
||||
(listof (list/c (one-of/c 'execute 'write 'delete
|
||||
'read 'exists)
|
||||
(listof (list/c (or/c 'execute 'write 'delete 'read 'exists)
|
||||
(or/c byte-regexp? bytes? string? path?)))]{
|
||||
|
||||
A parameter that configures the behavior of the default sandbox
|
||||
|
@ -444,9 +447,9 @@ collection libraries (including
|
|||
|
||||
@defparam[sandbox-network-guard proc
|
||||
(symbol?
|
||||
(or/c (and/c string? immutable?) false/c)
|
||||
(or/c (integer-in 1 65535) false/c)
|
||||
(one-of/c 'server 'client)
|
||||
(or/c (and/c string? immutable?) #f)
|
||||
(or/c (integer-in 1 65535) #f)
|
||||
(or/c 'server 'client)
|
||||
. -> . any)]{
|
||||
|
||||
A parameter that specifieds a procedure to be used (as is) by the
|
||||
|
@ -455,9 +458,9 @@ network connection.}
|
|||
|
||||
|
||||
@defparam[sandbox-eval-limits limits
|
||||
(or/c (list/c (or/c exact-nonnegative-integer? false/c)
|
||||
(or/c exact-nonnegative-integer? false/c))
|
||||
false/c)]{
|
||||
(or/c (list/c (or/c exact-nonnegative-integer? #f)
|
||||
(or/c exact-nonnegative-integer? #f))
|
||||
#f)]{
|
||||
|
||||
A parameter that determines the default limits on @italic{each} use of
|
||||
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)]
|
||||
[secs (or/c exact-nonnegative-integer? false/c)]
|
||||
[mb (or/c exact-nonnegative-integer? false/c)]) void?]{
|
||||
[secs (or/c exact-nonnegative-integer? #f)]
|
||||
[mb (or/c exact-nonnegative-integer? #f)]) void?]{
|
||||
|
||||
Changes the per-expression limits that @scheme[evaluator] uses to
|
||||
@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.}
|
||||
|
||||
|
||||
@defproc[(call-with-limits [secs (or/c exact-nonnegative-integer? false/c)]
|
||||
[mb (or/c exact-nonnegative-integer? false/c)]
|
||||
@defproc[(call-with-limits [secs (or/c exact-nonnegative-integer? #f)]
|
||||
[mb (or/c exact-nonnegative-integer? #f)]
|
||||
[thunk (-> any)])
|
||||
any]{
|
||||
|
||||
|
@ -642,7 +645,7 @@ A macro version of @scheme[call-with-limits].}
|
|||
|
||||
@defproc*[([(exn:fail:resource? [v any/c]) boolean?]
|
||||
[(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
|
||||
@scheme[call-with-limits]. The @scheme[resource] field holds a symbol,
|
||||
|
|
|
@ -29,16 +29,15 @@ host platform.
|
|||
|
||||
@defproc[(make-security-guard [parent security-guard?]
|
||||
[file-guard (symbol?
|
||||
(or/c path? false/c)
|
||||
(or/c path? #f)
|
||||
(listof symbol?)
|
||||
. -> . any)]
|
||||
[network-guard (symbol?
|
||||
(or/c (and/c string? immutable?) false/c)
|
||||
(or/c (integer-in 1 65535) false/c)
|
||||
(one-of/c 'server 'client)
|
||||
(or/c (and/c string? immutable?) #f)
|
||||
(or/c (integer-in 1 65535) #f)
|
||||
(or/c 'server 'client)
|
||||
. -> . any)]
|
||||
[link (or/c (symbol? path? path? . -> . any)
|
||||
false/c)
|
||||
[link (or/c (symbol? path? path? . -> . any) #f)
|
||||
#f])
|
||||
security-guard?]{
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@ the event does not decrement @scheme[sema]'s internal count.}
|
|||
|
||||
@defproc[(call-with-semaphore [sema semaphore?]
|
||||
[proc procedure?]
|
||||
[try-fail-thunk (or/c (-> any) false/c) #f]
|
||||
[try-fail-thunk (or/c (-> any) #f) #f]
|
||||
[arg any/c] ...) any]{
|
||||
|
||||
Waits on @scheme[sema] using @scheme[semaphore-wait], calls
|
||||
|
@ -78,7 +78,7 @@ wait fails.}
|
|||
|
||||
@defproc[(call-with-semaphore/enable-break [sema semaphore?]
|
||||
[proc procedure?]
|
||||
[try-fail-thunk (or/c (-> any) false/c) #f]
|
||||
[try-fail-thunk (or/c (-> any) #f) #f]
|
||||
[arg any/c] ...) any]{
|
||||
Like @scheme[call-with-semaphore], except that
|
||||
@scheme[semaphore-wait/enable-break] is used with @scheme[sema] in
|
||||
|
|
|
@ -81,7 +81,7 @@ Returns a sequence equivalent to @scheme[lst].
|
|||
|
||||
@defproc[(in-vector [vec vector?]
|
||||
[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])
|
||||
sequence?]{
|
||||
|
||||
|
@ -110,7 +110,7 @@ demanded from the sequence.
|
|||
|
||||
@defproc[(in-string [str string?]
|
||||
[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])
|
||||
sequence?]{
|
||||
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?]
|
||||
[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])
|
||||
sequence?]{
|
||||
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).}
|
||||
|
||||
@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?]{
|
||||
|
||||
Returns a sequence whose elements are the result of @scheme[(read-line
|
||||
|
|
|
@ -21,7 +21,7 @@ an end-of-file, then @scheme[eof] is returned.}
|
|||
|
||||
|
||||
@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?)]{
|
||||
|
||||
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.}
|
||||
|
||||
@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?)]{
|
||||
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?))]
|
||||
[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)]
|
||||
[start-pos exact-nonnegative-integer? 0]
|
||||
[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?))]
|
||||
[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)]
|
||||
[start-pos exact-nonnegative-integer? 0]
|
||||
[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?))]
|
||||
[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)]
|
||||
[start-pos exact-nonnegative-integer? 0]
|
||||
[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)]
|
||||
[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)]{
|
||||
|
||||
Like @scheme[peek-char-or-special], but reads and returns a byte
|
||||
|
|
|
@ -69,7 +69,7 @@ is raised.}
|
|||
[out output-port? (current-output-port)]
|
||||
[start-pos exact-nonnegative-integer? 0]
|
||||
[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]
|
||||
if the port contains buffered data that cannot be written immediately,
|
||||
|
|
|
@ -51,7 +51,7 @@ structure types.}
|
|||
|
||||
|
||||
@defproc[(struct-info [v any/c])
|
||||
(values (or/c struct-type? false/c)
|
||||
(values (or/c struct-type? #f)
|
||||
boolean?)]{
|
||||
|
||||
Returns two values:
|
||||
|
@ -77,7 +77,7 @@ Returns two values:
|
|||
struct-accessor-procedure?
|
||||
struct-mutator-procedure?
|
||||
(listof exact-nonnegative-integer?)
|
||||
(or/c struct-type? false/c)
|
||||
(or/c struct-type? #f)
|
||||
boolean?)]{
|
||||
|
||||
Returns eight values that provide information about the structure type
|
||||
|
|
|
@ -81,22 +81,22 @@ structures depends on the current inspector.)
|
|||
@section[#:tag "creatingmorestructs"]{Creating Structure Types}
|
||||
|
||||
@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?]
|
||||
[auto-field-cnt exact-nonnegative-integer?]
|
||||
[auto-v any/c #f]
|
||||
[props (listof (cons/c struct-type-property?
|
||||
any/c))
|
||||
null]
|
||||
[inspector (or/c inspector? false/c (one-of/c 'prefab))
|
||||
[inspector (or/c inspector? #f 'prefab)
|
||||
(current-inspector)]
|
||||
[proc-spec (or/c procedure?
|
||||
exact-nonnegative-integer?
|
||||
false/c)
|
||||
#f)
|
||||
#f]
|
||||
[immutables (listof exact-nonnegative-integer?)
|
||||
null]
|
||||
[guard (or/c procedure? false/c) #f])
|
||||
[guard (or/c procedure? #f) #f])
|
||||
(values struct-type?
|
||||
struct-constructor-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.
|
||||
|
||||
@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?
|
||||
(any/c . -> . any/c)))
|
||||
null])
|
||||
|
@ -443,7 +443,7 @@ is inaccessible.)}
|
|||
@scheme[define-struct], @scheme[make-struct-type], or
|
||||
@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
|
||||
@tech{prefab} structure type. Otherwise, the result is the shorted key
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
@title[#:tag "stxcmp"]{Syntax Object Bindings}
|
||||
|
||||
@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)])
|
||||
boolean?]{
|
||||
|
||||
|
@ -16,7 +16,7 @@ suitable expression context at the @tech{phase level} indicated by
|
|||
|
||||
|
||||
@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)])
|
||||
boolean?]{
|
||||
|
||||
|
@ -46,7 +46,7 @@ Same as @scheme[(free-identifier=? a-id b-id #f)].}
|
|||
|
||||
|
||||
@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
|
||||
in the list with @scheme[bound-identifier=?]. If any comparison
|
||||
|
@ -56,16 +56,17 @@ is @scheme[#f].}
|
|||
|
||||
|
||||
@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)])
|
||||
(or/c (one-of 'lexical #f)
|
||||
(or/c 'lexical
|
||||
#f
|
||||
(listof module-path-index?
|
||||
symbol?
|
||||
module-path-index?
|
||||
symbol?
|
||||
(one-of/c 0 1)
|
||||
(or/c exact-integer? false/c)
|
||||
(or/c exact-integer? false/c)))]{
|
||||
(or/c 0 1)
|
||||
(or/c exact-integer? #f)
|
||||
(or/c exact-integer? #f)))]{
|
||||
|
||||
Returns one of three kinds of values, depending on the binding of
|
||||
@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?])
|
||||
(or/c (one-of 'lexical #f)
|
||||
(or/c 'lexical
|
||||
#f
|
||||
(listof module-path-index?
|
||||
symbol?
|
||||
module-path-index?
|
||||
symbol?
|
||||
(one-of/c 0 1)
|
||||
(or/c exact-integer? false/c)
|
||||
(or/c exact-integer? false/c)))]{
|
||||
(or/c 0 1)
|
||||
(or/c exact-integer? #f)
|
||||
(or/c exact-integer? #f)))]{
|
||||
|
||||
Same as @scheme[(identifier-binding id-stx (add1 (syntax-local-phase-level)))].}
|
||||
|
||||
|
||||
@defproc[(identifier-template-binding [id-stx syntax?])
|
||||
(or/c (one-of 'lexical #f)
|
||||
(or/c 'lexical
|
||||
#f
|
||||
(listof module-path-index?
|
||||
symbol?
|
||||
module-path-index?
|
||||
symbol?
|
||||
(one-of/c 0 1)
|
||||
(or/c exact-integer? false/c)
|
||||
(or/c exact-integer? false/c)))]{
|
||||
(or/c 0 1)
|
||||
(or/c exact-integer? #f)
|
||||
(or/c exact-integer? #f)))]{
|
||||
|
||||
Same as @scheme[(identifier-binding id-stx (sub1 (syntax-local-phase-level)))].}
|
||||
|
||||
|
||||
@defproc[(identifier-label-binding [id-stx syntax?])
|
||||
(or/c (one-of 'lexical #f)
|
||||
(or/c 'lexical
|
||||
#f
|
||||
(listof module-path-index?
|
||||
symbol?
|
||||
module-path-index?
|
||||
symbol?
|
||||
(one-of/c 0 1)
|
||||
(or/c exact-integer? false/c)
|
||||
(or/c exact-integer? false/c)))]{
|
||||
(or/c 0 1)
|
||||
(or/c exact-integer? #f)
|
||||
(or/c exact-integer? #f)))]{
|
||||
|
||||
Same as @scheme[(identifier-binding id-stx #f)].}
|
||||
|
||||
|
|
|
@ -19,8 +19,7 @@ object that is marshaled as part of compiled code; see also
|
|||
|
||||
|
||||
@defproc[(syntax-line [stx syntax?])
|
||||
(or/c exact-positive-integer?
|
||||
false/c)]{
|
||||
(or/c exact-positive-integer? #f)]{
|
||||
|
||||
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
|
||||
|
@ -31,8 +30,7 @@ about marshaling compiled @tech{syntax object}s.}
|
|||
|
||||
|
||||
@defproc[(syntax-column [stx syntax?])
|
||||
(or/c exact-nonnegative-integer?
|
||||
false/c)]{
|
||||
(or/c exact-nonnegative-integer? #f)]{
|
||||
|
||||
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
|
||||
|
@ -43,8 +41,7 @@ about marshaling compiled @tech{syntax object}s.}
|
|||
|
||||
|
||||
@defproc[(syntax-position [stx syntax?])
|
||||
(or/c exact-positive-integer?
|
||||
false/c)]{
|
||||
(or/c exact-positive-integer? #f)]{
|
||||
|
||||
Returns the character position (positive exact integer) for the start
|
||||
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?])
|
||||
(or/c exact-nonnegative-integer?
|
||||
false/c)]{
|
||||
(or/c exact-nonnegative-integer? #f)]{
|
||||
|
||||
Returns the span (non-negative exact integer) in characters of the
|
||||
@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?])
|
||||
(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"])
|
||||
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?])
|
||||
(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
|
||||
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
|
||||
source-location information recursively.}
|
||||
|
||||
@defproc[(datum->syntax [ctxt (or/c syntax? false/c)]
|
||||
@defproc[(datum->syntax [ctxt (or/c syntax? #f)]
|
||||
[v any/c]
|
||||
[srcloc (or/c syntax? false/c
|
||||
[srcloc (or/c syntax? #f
|
||||
(list/c any/c
|
||||
(or/c exact-positive-integer? false/c)
|
||||
(or/c exact-nonnegative-integer? false/c)
|
||||
(or/c exact-nonnegative-integer? false/c)
|
||||
(or/c exact-positive-integer? false/c))
|
||||
(or/c exact-positive-integer? #f)
|
||||
(or/c exact-nonnegative-integer? #f)
|
||||
(or/c exact-nonnegative-integer? #f)
|
||||
(or/c exact-positive-integer? #f))
|
||||
(vector/c any/c
|
||||
(or/c exact-positive-integer? false/c)
|
||||
(or/c exact-nonnegative-integer? false/c)
|
||||
(or/c exact-nonnegative-integer? false/c)
|
||||
(or/c exact-positive-integer? false/c)))]
|
||||
[prop (or/c syntax? false/c) #f]
|
||||
[cert (or/c syntax? false/c) #f])
|
||||
(or/c exact-positive-integer? #f)
|
||||
(or/c exact-nonnegative-integer? #f)
|
||||
(or/c exact-nonnegative-integer? #f)
|
||||
(or/c exact-positive-integer? #f)))]
|
||||
[prop (or/c syntax? #f) #f]
|
||||
[cert (or/c syntax? #f) #f])
|
||||
syntax?]{
|
||||
|
||||
Converts the @tech{datum} @scheme[v] to a @tech{syntax object}. If
|
||||
|
|
|
@ -83,13 +83,9 @@ create @scheme[transformer].}
|
|||
|
||||
|
||||
@defproc[(local-expand [stx syntax?]
|
||||
[context-v (or/c (one-of 'expression 'top-level 'module
|
||||
'module-begin)
|
||||
list?)]
|
||||
[stop-ids (or/c (listof identifier?) false/c)]
|
||||
[intdef-ctx (or/c internal-definition-context?
|
||||
false/c)
|
||||
#f])
|
||||
[context-v (or/c 'expression 'top-level 'module 'module-begin list?)]
|
||||
[stop-ids (or/c (listof identifier?) #f)]
|
||||
[intdef-ctx (or/c internal-definition-context? #f) #f])
|
||||
syntax?]{
|
||||
|
||||
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?]
|
||||
[context-v (or/c (one-of 'expression 'top-level 'module
|
||||
'module-begin)
|
||||
list?)]
|
||||
[stop-ids (or/c (listof identifier?) false/c)]
|
||||
[intdef-ctx (or/c internal-definition-context?
|
||||
false/c)
|
||||
#f])
|
||||
[context-v (or/c 'expression 'top-level 'module 'module-begin list?)]
|
||||
[stop-ids (or/c (listof identifier?) #f)]
|
||||
[intdef-ctx (or/c internal-definition-context? #f) #f])
|
||||
syntax?]{
|
||||
|
||||
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?]
|
||||
[context-v (or/c (one-of 'expression 'top-level 'module
|
||||
'module-begin)
|
||||
list?)]
|
||||
[stop-ids (or/c (listof identifier?) false/c)]
|
||||
[intdef-ctx (or/c internal-definition-context?
|
||||
false/c)
|
||||
#f]
|
||||
[context-v (or/c 'expression 'top-level 'module 'module-begin list?)]
|
||||
[stop-ids (or/c (listof identifier?) #f)]
|
||||
[intdef-ctx (or/c internal-definition-context? #f) #f]
|
||||
[lift-ctx any/c (gensym 'lifts)])
|
||||
syntax?]{
|
||||
|
||||
|
@ -185,13 +173,9 @@ expressions are not expanded, but instead left as provided in the
|
|||
|
||||
|
||||
@defproc[(local-transformer-expand/capture-lifts [stx syntax?]
|
||||
[context-v (or/c (one-of 'expression 'top-level 'module
|
||||
'module-begin)
|
||||
list?)]
|
||||
[stop-ids (or/c (listof identifier?) false/c)]
|
||||
[intdef-ctx (or/c internal-definition-context?
|
||||
false/c)
|
||||
#f])
|
||||
[context-v (or/c 'expression 'top-level 'module 'module-begin list?)]
|
||||
[stop-ids (or/c (listof identifier?) #f)]
|
||||
[intdef-ctx (or/c internal-definition-context? #f) #f])
|
||||
syntax?]{
|
||||
|
||||
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?)]
|
||||
[expr (or/c syntax? false/c)]
|
||||
[expr (or/c syntax? #f)]
|
||||
[intdef-ctx internal-definition-context?])
|
||||
void?]{
|
||||
|
||||
|
@ -233,10 +217,10 @@ match the number of identifiers, otherwise the
|
|||
|
||||
|
||||
@defproc[(syntax-local-value [id-stx syntax?]
|
||||
[failure-thunk (or/c (-> any) false/c)
|
||||
[failure-thunk (or/c (-> any) #f)
|
||||
#f]
|
||||
[intdef-ctx (or/c internal-definition-context?
|
||||
false/c)
|
||||
#f)
|
||||
#f])
|
||||
any]{
|
||||
|
||||
|
@ -324,7 +308,7 @@ eventually expanded in an expression context.
|
|||
@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
|
||||
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)
|
||||
(or/c (one-of 'expression 'top-level 'module 'module-begin)
|
||||
list?)]{
|
||||
(or/c 'expression 'top-level 'module 'module-begin list?)]{
|
||||
|
||||
Returns an indication of the context for expansion that triggered a
|
||||
@tech{syntax transformer} call. See @secref["expand-context-model"]
|
||||
|
@ -358,7 +341,7 @@ contexts.
|
|||
@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
|
||||
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])
|
||||
((syntax?) (any/c (or/c procedure? false/c))
|
||||
((syntax?) (any/c (or/c procedure? #f))
|
||||
. ->* . syntax?)]{
|
||||
|
||||
Returns a procedure that captures any certificates currently available
|
||||
|
@ -482,9 +465,9 @@ for-syntax) definitions.}
|
|||
|
||||
|
||||
@defproc[(syntax-local-module-required-identifiers
|
||||
[mod-path (or/c module-path? false/c)]
|
||||
[phase-level (or/c exact-integer? false/c (one-of/c #t))])
|
||||
(listof (cons/c (or/c exact-integer? false/c)
|
||||
[mod-path (or/c module-path? #f)]
|
||||
[phase-level (or/c exact-integer? #f #t)])
|
||||
(listof (cons/c (or/c exact-integer? #f)
|
||||
(listof identifier?)))]{
|
||||
|
||||
Can be called only while
|
||||
|
@ -566,9 +549,9 @@ Returns @scheme[#t] if @scheme[v] has the
|
|||
@defstruct[import ([local-id identifier?]
|
||||
[src-sym symbol?]
|
||||
[src-mod-path module-path?]
|
||||
[mode (or/c exact-integer? false/c)]
|
||||
[req-mode (or/c exact-integer? false/c)]
|
||||
[orig-mode (or/c exact-integer? false/c)]
|
||||
[mode (or/c exact-integer? #f)]
|
||||
[req-mode (or/c exact-integer? #f)]
|
||||
[orig-mode (or/c exact-integer? #f)]
|
||||
[orig-stx syntax?])]{
|
||||
|
||||
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?
|
||||
(lambda (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
|
||||
@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)
|
||||
((syntax?) (or/c false/c (syntax? . -> . syntax?))
|
||||
((syntax?) (or/c #f (syntax? . -> . syntax?))
|
||||
. ->* . 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.
|
||||
|
||||
|
||||
@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?)]{
|
||||
|
||||
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.}
|
||||
|
||||
|
||||
@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?))])
|
||||
provide-transformer?]{
|
||||
|
||||
|
@ -687,7 +670,7 @@ Returns @scheme[#t] if @scheme[v] has the
|
|||
|
||||
@defstruct[export ([local-id identifier?]
|
||||
[out-sym symbol?]
|
||||
[mode (or/c exact-integer? false/c)]
|
||||
[mode (or/c exact-integer? #f)]
|
||||
[protect? any/c]
|
||||
[orig-stx syntax?])]{
|
||||
|
||||
|
@ -713,7 +696,7 @@ A structure representing a single imported identifier:
|
|||
|
||||
|
||||
@defproc[(syntax-local-provide-certifier)
|
||||
((syntax?) (or/c false/c (syntax? . -> . syntax?))
|
||||
((syntax?) (or/c #f (syntax? . -> . syntax?))
|
||||
. ->* . syntax?)]{
|
||||
|
||||
Like @scheme[syntax-local-certifier], but to certify @tech{syntax
|
||||
|
|
|
@ -4,25 +4,25 @@
|
|||
|
||||
@title[#:tag "subprocess"]{Processes}
|
||||
|
||||
@defproc*[([(subprocess [stdout (or/c output-port? false/c)]
|
||||
[stdin (or/c input-port? false/c)]
|
||||
[stderr (or/c output-port? false/c)]
|
||||
@defproc*[([(subprocess [stdout (or/c (and/c output-port? file-stream-port?) #f)]
|
||||
[stdin (or/c (and/c input-port? file-stream-port?) #f)]
|
||||
[stderr (or/c (and/c output-port? file-stream-port?) #f)]
|
||||
[command path-string?]
|
||||
[arg string?] ...)
|
||||
(values subprocess?
|
||||
(or/c input-port? false/c)
|
||||
(or/c output-port? false/c)
|
||||
(or/c input-port? false/c))]
|
||||
[(subprocess [stdout (or/c output-port? false/c)]
|
||||
[stdin (or/c input-port? false/c)]
|
||||
[stderr (or/c output-port? false/c)]
|
||||
(or/c (and/c input-port? file-stream-port?) #f)
|
||||
(or/c (and/c output-port? file-stream-port?) #f)
|
||||
(or/c (and/c input-port? file-stream-port?) #f))]
|
||||
[(subprocess [stdout (or/c (and/c output-port? file-stream-port?) #f)]
|
||||
[stdin (or/c (and/c input-port? file-stream-port?) #f)]
|
||||
[stderr (or/c (and/c output-port? file-stream-port?) #f)]
|
||||
[command path-string?]
|
||||
[exact (one-of/c 'exact)]
|
||||
[exact 'exact]
|
||||
[arg string?])
|
||||
(values subprocess?
|
||||
(or/c input-port? false/c)
|
||||
(or/c output-port? false/c)
|
||||
(or/c input-port? false/c))])]{
|
||||
(or/c (and/c input-port? file-stream-port?) #f)
|
||||
(or/c (and/c output-port? file-stream-port?) #f)
|
||||
(or/c (and/c input-port? file-stream-port?) #f))])]{
|
||||
|
||||
Creates a new process in the underlying operating system to execute
|
||||
@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?])
|
||||
(or/c (one-of/c 'running)
|
||||
(or/c 'running
|
||||
exact-nonnegative-integer?)]{
|
||||
|
||||
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.}
|
||||
|
||||
|
||||
@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?])
|
||||
false/c]
|
||||
#f]
|
||||
|
||||
@index['("ShellExecute")]{Performs} the action specified by @scheme[verb]
|
||||
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?]
|
||||
[(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
|
||||
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)]
|
||||
[(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
|
||||
@scheme[system/exit-code].}
|
||||
|
@ -267,7 +267,7 @@ Like @scheme[system*], but returns the exit code like
|
|||
output-port?
|
||||
exact-nonnegative-integer?
|
||||
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:
|
||||
|
||||
|
@ -313,7 +313,7 @@ be explicitly closed with @scheme[close-input-port] or
|
|||
|
||||
|
||||
@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
|
||||
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].}
|
||||
|
||||
|
||||
@defproc[(process/ports [out (or/c false/c output-port?)]
|
||||
[in (or/c false/c input-port?)]
|
||||
[error-out (or/c false/c output-port?)]
|
||||
@defproc[(process/ports [out (or/c #f output-port?)]
|
||||
[in (or/c #f input-port?)]
|
||||
[error-out (or/c #f output-port?)]
|
||||
[command string?])
|
||||
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
|
||||
in the returned list is @scheme[#f].}
|
||||
|
||||
@defproc*[([(process*/ports [out (or/c false/c output-port?)]
|
||||
[in (or/c false/c input-port?)]
|
||||
[error-out (or/c false/c output-port?)]
|
||||
@defproc*[([(process*/ports [out (or/c #f output-port?)]
|
||||
[in (or/c #f input-port?)]
|
||||
[error-out (or/c #f output-port?)]
|
||||
[command path-string?]
|
||||
[arg string?] ...)
|
||||
list?]
|
||||
[(process*/ports [out (or/c false/c output-port?)]
|
||||
[in (or/c false/c input-port?)]
|
||||
[error-out (or/c false/c output-port?)]
|
||||
[(process*/ports [out (or/c #f output-port?)]
|
||||
[in (or/c #f input-port?)]
|
||||
[error-out (or/c #f output-port?)]
|
||||
[command path-string?]
|
||||
[exact (one-of/c 'exact)]
|
||||
[exact 'exact]
|
||||
[arg string?])
|
||||
list?])]{
|
||||
|
||||
|
|
|
@ -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
|
||||
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
|
||||
least one custodian (possibly added through @scheme[benefactor], as
|
||||
|
@ -233,7 +233,7 @@ asynchronous channel.
|
|||
@margin-note/ref{See also @secref["async-channel"].}
|
||||
|
||||
@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 ....))])
|
||||
any]{
|
||||
|
||||
|
|
|
@ -127,14 +127,14 @@ Converts a date to a string. The returned string contains the time of
|
|||
day only if @scheme[time?]. See also @scheme[date-display-format].}
|
||||
|
||||
|
||||
@defparam[date-display-format format (one-of/c 'american
|
||||
'chinese
|
||||
'german
|
||||
'indian
|
||||
'irish
|
||||
'iso-8601
|
||||
'rfc2822
|
||||
'julian)]{
|
||||
@defparam[date-display-format format (or/c 'american
|
||||
'chinese
|
||||
'german
|
||||
'indian
|
||||
'irish
|
||||
'iso-8601
|
||||
'rfc2822
|
||||
'julian)]{
|
||||
|
||||
Parameter that determines the date string format. The initial format
|
||||
is @scheme['american].}
|
||||
|
|
|
@ -688,9 +688,9 @@ that defines macro with @scheme[define-syntax].
|
|||
|
||||
@defproc[(unit-static-signatures [unit-identifier identifier?]
|
||||
[err-syntax syntax?])
|
||||
(values (list/c (cons/c (or/c symbol? false/c)
|
||||
(values (list/c (cons/c (or/c symbol? #f)
|
||||
identifier?))
|
||||
(list/c (cons/c (or/c symbol? false/c)
|
||||
(list/c (cons/c (or/c symbol? #f)
|
||||
identifier?)))]{
|
||||
|
||||
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?]
|
||||
[err-syntax syntax?])
|
||||
(values (or/c identifier? false/c)
|
||||
(values (or/c identifier? #f)
|
||||
(listof identifier?)
|
||||
(listof identifier?)
|
||||
(listof identifier?))]{
|
||||
|
|
|
@ -189,8 +189,8 @@ A parameter that controls printing values in an alternate syntax. See
|
|||
|
||||
|
||||
@defparam*[current-write-relative-directory path
|
||||
(or/c (and/c path-string? complete-path?) false/c)
|
||||
(or/c (and/c path? complete-path?) false/c)]{
|
||||
(or/c (and/c path-string? complete-path?) #f)
|
||||
(or/c (and/c path? complete-path?) #f)]{
|
||||
|
||||
A parameter that is used when writing compiled code that contains
|
||||
pathname literals, including source-location pathnames for procedure
|
||||
|
|
|
@ -282,11 +282,11 @@ For backward compatibility, the default values for
|
|||
@scheme[current-comment-color], etc.}
|
||||
|
||||
@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.}
|
||||
|
||||
@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
|
||||
(use-last pict (or (pict-last bl-pict) bl-pict)))].}
|
||||
|
|
|
@ -72,8 +72,8 @@ information from a pict.
|
|||
[ascent real?]
|
||||
[descent real?]
|
||||
[children (listof child?)]
|
||||
[panbox (or/c false/c any/c)]
|
||||
[last (or/c false/c pict?)])]{
|
||||
[panbox (or/c #f any/c)]
|
||||
[last (or/c #f pict?)])]{
|
||||
|
||||
A @scheme[pict] structure is normally not created directly with
|
||||
@scheme[make-pict]. Instead, functions like @scheme[text],
|
||||
|
@ -200,15 +200,15 @@ and the ascent is the height.}
|
|||
|
||||
|
||||
@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?]
|
||||
[#: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.}
|
||||
|
||||
@defproc[(frame [pict pict?]
|
||||
[#: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])
|
||||
pict?]{
|
||||
|
||||
|
@ -285,8 +285,8 @@ argument for consistency with the other functions.}
|
|||
[find-src (pict? pict-path? . -> . (values real? real?))]
|
||||
[dest pict-path?]
|
||||
[find-dest (pict? pict-path? . -> . (values real? real?))]
|
||||
[#:line-width line-width (or/c false/c real?) #f]
|
||||
[#:color color (or/c false/c string? (is-a/c? color%)) #f]
|
||||
[#:line-width line-width (or/c #f real?) #f]
|
||||
[#:color color (or/c #f string? (is-a/c? color%)) #f]
|
||||
[#:under? under? any/c #f])
|
||||
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?))]
|
||||
[dest pict-path?]
|
||||
[find-dest (pict? pict-path? . -> . (values real? real?))]
|
||||
[#:line-width line-width (or/c false/c real?) #f]
|
||||
[#:color color (or/c false/c string? (is-a/c? color%)) #f]
|
||||
[#:line-width line-width (or/c #f real?) #f]
|
||||
[#:color color (or/c #f string? (is-a/c? color%)) #f]
|
||||
[#:under? under? any/c #f]
|
||||
[#:solid? solid? any/c #t])
|
||||
pict?]
|
||||
|
@ -304,8 +304,8 @@ argument for consistency with the other functions.}
|
|||
[find-src (pict? pict-path? . -> . (values real? real?))]
|
||||
[dest pict-path?]
|
||||
[find-dest (pict? pict-path? . -> . (values real? real?))]
|
||||
[#:line-width line-width (or/c false/c real?) #f]
|
||||
[#:color color (or/c false/c string? (is-a/c? color%)) #f]
|
||||
[#:line-width line-width (or/c #f real?) #f]
|
||||
[#:color color (or/c #f string? (is-a/c? color%)) #f]
|
||||
[#:under? under? any/c #f]
|
||||
[#:solid? solid? any/c #t])
|
||||
pict?])]{
|
||||
|
@ -636,9 +636,9 @@ which case true means @scheme["gray"] and false means
|
|||
|
||||
@defproc[(standard-fish [w 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"]
|
||||
[#: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])
|
||||
pict?]{
|
||||
|
||||
|
@ -675,7 +675,7 @@ library provides functions for creating and placing cartoon-speech
|
|||
balloons.}
|
||||
|
||||
@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?]
|
||||
[dy real?]
|
||||
[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.}
|
||||
|
||||
@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?]
|
||||
[dy real?]
|
||||
[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?]
|
||||
[h real?]
|
||||
[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?]
|
||||
[dy real?]
|
||||
[color (or/c string? (is-a?/c color%)) balloon-color])
|
||||
|
@ -803,9 +803,9 @@ follows:
|
|||
|
||||
}}
|
||||
|
||||
@defproc[(face* [eyebrow-kind (one-of/c 'none 'normal 'worried 'angry)]
|
||||
[mouth-kind (one-of/c 'plain 'smaller 'narrow 'medium 'large
|
||||
'huge 'grimace 'oh 'tongue)]
|
||||
@defproc[(face* [eyebrow-kind (or/c 'none 'normal 'worried 'angry)]
|
||||
[mouth-kind (or/c 'plain 'smaller 'narrow 'medium 'large
|
||||
'huge 'grimace 'oh 'tongue)]
|
||||
[frown? any/c]
|
||||
[color (or/c string (is-a?/c color%))]
|
||||
[eye-inset real?]
|
||||
|
@ -941,7 +941,7 @@ exact numbers; the procedure is called with each number from 0 to
|
|||
|
||||
@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
|
||||
created with @scheme[text].
|
||||
|
@ -972,8 +972,8 @@ repeated calls to @scheme[draw-pict].}
|
|||
|
||||
|
||||
@defproc[(show-pict [pict pict?]
|
||||
[w (or/c false/c exact-nonnegative-integer?) #f]
|
||||
[h (or/c false/c exact-nonnegative-integer?) #f])
|
||||
[w (or/c #f exact-nonnegative-integer?) #f]
|
||||
[h (or/c #f exact-nonnegative-integer?) #f])
|
||||
void?]{
|
||||
|
||||
Opens a frame that displays @scheme[pict]. The frame adds one method,
|
||||
|
|
|
@ -20,15 +20,15 @@
|
|||
|
||||
@section{Primary Slide Functions}
|
||||
|
||||
@defproc[(slide [#:title title (or/c false/c string?) #f]
|
||||
[#:name name (or/c false/c string?) title]
|
||||
[#:layout layout (one-of-/c 'auto 'center 'top 'tall) 'auto]
|
||||
@defproc[(slide [#:title title (or/c #f string?) #f]
|
||||
[#:name name (or/c #f string?) title]
|
||||
[#:layout layout (or/c 'auto 'center 'top 'tall) 'auto]
|
||||
[#: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)]
|
||||
[element (flat-rec-contract elem/c
|
||||
(or/c pict?
|
||||
(one-of/c 'next 'next! 'alts 'alts~ 'nothing)
|
||||
(or/c 'next 'next! 'alts 'alts~ 'nothing)
|
||||
comment?
|
||||
(listof (listof elem/c))))] ...)
|
||||
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)].}
|
||||
|
||||
@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]
|
||||
[#:decode? decode? any/c #t]
|
||||
[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)]
|
||||
[#: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]
|
||||
[#:decode? decode? any/c #t]
|
||||
[element (flat-rec-contract elem/c
|
||||
|
@ -157,7 +157,7 @@ paragraph.}
|
|||
|
||||
@defproc[(subitem [#:width width real? (current-para-width)]
|
||||
[#: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]
|
||||
[#:decode? decode? any/c #t]
|
||||
[element (flat-rec-contract elem/c
|
||||
|
@ -188,7 +188,7 @@ display.}
|
|||
|
||||
@defproc[(make-outline [name (or/c symbol? (listof symbol?))]
|
||||
[title (or/c string? pict?)]
|
||||
[subitems (or/c false/c null?
|
||||
[subitems (or/c #f null?
|
||||
(symbol? . -> . pict?))]
|
||||
...)
|
||||
(symbol? . -> . void?)]{
|
||||
|
@ -306,7 +306,7 @@ argument.
|
|||
|
||||
@section{Constants and Layout Variables}
|
||||
|
||||
@defthing[gap-size (one-of/c 24)]{
|
||||
@defthing[gap-size 24]{
|
||||
|
||||
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"].}
|
||||
|
||||
|
||||
@defparam[current-slide-assembler proc ((or/c string? false/c)
|
||||
@defparam[current-slide-assembler proc ((or/c string? #f)
|
||||
exact-nonnegative-integer?
|
||||
pict?
|
||||
. -> .
|
||||
|
@ -574,7 +574,7 @@ of whether the name fo the last @scheme[id] name ends in @litchar{~}).
|
|||
[width real?]
|
||||
[height real?]
|
||||
[condense? any/c]
|
||||
[stop-after (or/c false/c exact-nonnegative-integer?) #f])
|
||||
[stop-after (or/c #f exact-nonnegative-integer?) #f])
|
||||
(listof pict?)]{
|
||||
|
||||
Executes the Slideshow program indicated by @scheme[path] in a fresh
|
||||
|
|
|
@ -136,7 +136,7 @@
|
|||
[sharing (:or (:: "#" (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
|
||||
(syntax-rules ()
|
||||
|
|
Loading…
Reference in New Issue
Block a user