get-bytes-all
and put-bytes
, which should be get-bytevector-all
and put-bytevector
.
close-port
, and should be:
#!r6rs (import (rnrs base) (rnrs io ports) (rnrs programs)) (let ((p (standard-output-port))) (put-bytevector p (call-with-port (open-file-input-port (cadr (command-line))) get-bytevector-all)) (close-port p))
"Some non-terminal names refer to the Unicode scalar values of the same name: <character tabulation> (U+0009), <linefeed> (U+000A), <carriage return> (U+000D), <line tabulation> (U+000B), <form feed> (U+000C), <carriage return> (U+000D), <space> (U+0020), <next line> (U+0085), <line separator> (U+2028), and <paragraph separator> (U+2029)."
contains a duplicate "<carriage return> (U+000D)", which should be elided.<decimal 10> -> <digit 10>+ . <suffix>
is redundant."Case is significant in #\<character>, and in #\<character name>, but not in #\x<hex scalar #value>." is worded confusingly.
It should be"Case is significant in #\<character>, and in #\<character name>, but not the in the <hex scalar #value> part of #\x<hex scalar #value>."
"The
-nan.0
literal also represents a NaN."
"An object fetched from a location, by a variable reference or by
a procedure such as car
,
vector-ref
, or string-ref
, is
equivalent in the sense of eqv?
(section 11.5)
to the object last stored in the location before the
fetch."
should be amended by:
", except when that object is a procedure. When the object is a procedure, the object fetched from the location will also be a procedure that behaves identically to the procedure last stored in the location, but it is possible that it is not the same object."
(stack)
example library is missing an
import of (rnrs mutable-pairs)
."equal, monotonically increasing, monotonically nondecreasing, monotonically decreasing, or monotonically nonincreasing"
fl<
which
should be fl<?
case
is slightly
confusing, as it suggests that 1 is a composite number: It
should be elided from the second branch of the case
.eqv?
on
inexact numbers - both #t
and #f
cases - the phrase
" [...] as a finite composition of Scheme's standard arithmetic procedures."
should be augmented by:
", as long as the evaluation of that application does not involve NaN."
"Furthermore, a constant may be copied at any time by the implementation so as to exist simultaneously in different sets of locations, as noted in section 11.4.1."
eq?
(eq? car car) => #tshould be replaced by
(eq? car car) => unspecified
list-ref
,
"list-tail
" should be replaced by "list-ref
".<
and >
on infinities have extra parentheses.min
and max
involving infinities should be prefixed by:
"For any real number object x that is not a NaN:"
inexact
, exact
,
min
, and max
mention a condition
type &implementation-violation
, which should
be &implementation-restriction
.
rationalize
says "returns a the a
number object": the "the" should be elided./
and
-
should have parameter lists
z1 z2
z3 ... respectively.(imag-part 1.1+2.2i) => 2.2i ; approximatelyshould be replaced by:
(imag-part 1.1+2.2i) => 2.2 ; approximately
div
, mod
etc., the wording
"In each case, x1 must be neither infinite nor a NaN,
and x2 must be nonzero; otherwise, an exception with
condition type &assertion
is raised."
"If x1 and x2
are exact, x2 must be nonzero. In the
cases where the mathematical requirements in section 11.7.3
cannot be satisfied by any number object, either an exception
is raised with condition type
&implementation-restriction
, or unspecified
number objects (one for for div
mod
,
div0
and mod0
, two for
div-and-mod
and div0-and-mod0
) are
returned."
(expt 0 5+.0000312i) => 0should be replaced by:
(expt 0 5+.0000312i) => 0.0
string->number
should be replaced
by:
"If the arguments to string->number
are a
string and a valid radix as specified, it must produce a
number object or #f
; it may not raise an
exception."
(I.e., string->number
may raise an exception
if the argument is not a string.)
append
procedure can be
called with zero arguments. Thus, in the description of
append
, a template
(append)
should be added.
The sentence at the end of the entry for append
should be clarified to:
"The return value is made from new pairs for all arguments but the last; the last is merely placed at the end of the new structure."
sqrt
for
which Scheme implementations are allowed to return either exact
or inexact results, which makes the examples potentially
confusing.
p => (15 5)should be:
p => (15 . 5)
(close-output-port (current-output-port))
string-titlecase
, the
words "via char-titlecase
" should be removed.
(I.e. string-titlecase
should use the full
mapping, not just the scalar-value-to-scalar-value mapping.)
(string-titlecase "r6rs") => "R6Rs" (string-titlecase "R6RS") > "R6Rs"should be replaced by:
(string-titlecase "r6rs") => "R6rs" (string-titlecase "R6RS") > "R6rs"
"The length of bytevector or, respectively, of list must be divisible by size."
should be replaced by"The length of bytevector must be divisible by size."
bytevector-s32-native-set!
,
the interval for n
should be {-231,
..., 231 - 1} instead of {-231, ...,
232 - 1}.bytevector-s64-native-set!
,
the interval for n
should be {-263,
..., 263 - 1} instead of {-263, ...,
264 - 1}.utf16->string
utf32->string
, the argument
endianness-mandatory should be spelled
endianness-mandatory?.
utf16->string
"Bytevector is decoded according to UTF-16BE or UTF-16LE:"
should be replaced by"Bytevector is decoded according to UTF-16, UTF-16BE, UTF-16LE, or a fourth encoding scheme that differs from all three of those as follows:"
utf32->string
"Bytevector is decoded according to UTF-32BE or UTF-32LE:"
should be replaced by"Bytevector is decoded according to UTF-32, UTF-32BE, UTF-32LE, or a fourth encoding scheme that differs from all three of those as follows:"
(for-all even? '(3 1 4 1 5 9 . 2)) => #fshould be removed, as this call to
for-all
may
raise an exception.
vector-sort!
is
incorrect; it should be:
(define v (vector 3 5 2 1)) (vector-sort! < v) => unspecified v => #(1 2 3 5)
"Each call to a record constructor returns a new record with a fresh location [...]"
should be replaced by:"Each call to a record constructor of a mutable record type returns a new record with a fresh location [...]"
The sentence
If obj1 and obj2
are both records of the same record type, and are the
results of two separate calls to record constructors,
then eqv
? returns
#f
.
If obj1 and obj2
are both records of the same mutable record type, and are the
results of two separate calls to record constructors,
then eqv
? returns
#f
.
parent-rtd
clause, analogously to
make-record-constructor-descriptor
,
either <parent rtd> or <parent cd> can evaluate to
#f
, according to rules analogous to those for
make-record-constructor-descriptor
.
"If rtd is a base record type and
protocol is a procedure,
parent-constructor-descriptor must be
#f
."
"If rtd is a base record type
parent-constructor-descriptor must be
#f
."
"If rtd is an extension of another record type, and
parent-constructor-descriptor or the protocol of
parent-constructor-descriptor is #f
,
protocol must lso be #f
, and a
default constructor descriptor as described above is also
assumed."
"If rtd is an extension of another record type and
parent-constructor-descriptor is #f
,
parent-constructor-descriptor is treated as if it were a
constructor descriptor for the parent rtd of rtd with a
default protocol."
make-point/abs
and an
example for cpoint-rgb
are
missing trailing parentheses, and should go like this:
(point-x (make-point/abs -1 -2)) => 1 (point-y (make-point/abs -1 -2)) => 2 ... (cpoint-rgb (make-cpoint -1 -3 'red)) => (rgb . red)
"If every
<cond clause>'s <test> evaluates to #f
and there
is no else
clause, then
raise
is re-invoked on the raised object
[...]"
"If every
<cond clause>'s <test> evaluates to #f
and there
is no else
clause, then
raise-continuable
is invoked on the raised object
[...]"
raise
is missing a parenthesis
after make-violation
and should go like this:
(guard (con ((error? con) (if (message-condition? con) (display (condition-message con)) (display "an error has occurred")) 'error)) (raise (condition (make-violation) (make-message-condition "I am an error")))) => &violation exception
cond1-x
cond2-y
are lacking trailing parentheses and should go like this:
(cond1-x (condition foo bar)) => foo (cond2-y (condition foo bar)) => bar
make-i/o-port-error
inappropraitely implies
that the argument must be a port, in conflict with the
description. The three occurrences of port in the
description should be replaced with pobj.
make-i/o-decoding-error
and
make-i/o-encoding-error
should be replaced
with pobj, and the occurrences of char
in the description of make-i/o-encoding-error
should be replaced with cobj
. The description
of make-i/o-encoding-error
should say that
cobj should be the character that could not be
encoded.make-custom-textual-input-port
:
``Even when the get-position procedure is supplied, the
port-position
procedure cannot generally return a precise
value for a custom textual input port if data has been
read from the port.''
make-custom-binary-output-port
, the sentence
"If count is 0, the write! procedure should have the effect of passing an end-of-file object to the byte sink."
should be deleted (it was left over from an earlier revision). The corresponding sentence in the description ofmake-custom-textual-output-port
should also be
deleted.
make-custom-binary-input/output-port
:
``Unless both get-position and set-position! procedures are
supplied, a put operation cannot precisely position the port for output
to a custom binary input/output port after data has been read from
the port.''
make-custom-textual-input/output-port
:
``Even when both get-position and set-position! procedures are
supplied, the port-position
procedure cannot generally return a
precise value for a custom textual input/output port, and a put operation
cannot precisely position the port for output, after data has
been read from the port.''
fx-
, the exception mentioned
should have condition type
&implementation-restriction
(as explained in
the introduction of that section), not
&assertion
.
fxcopy-bit-field
should be
clarified to say "the bits in fx4 from position 0 (inclusive) to position fx3 - fx2 (exclusive)"
instead of just"the corresponding bits in fx4".
fxcopy-bit-field
should be replaced by the
following:
(let* ((n fx1) (start fx2) (end fx3) (from fx4) (mask1 (fxarithmetic-shift-left -1 start)) (mask2 (fxnot (fxarithmetic-shift-left -1 end))) (mask (fxand mask1 mask2)) (mask3 (fxnot (fxarithmetic-shift-left -1 (- end start))))) (fxif mask (fxarithmetic-shift-left (fxand from mask3) start) to))
fxbit-count
, "ei" should be "fx".fxbit-set?
,
the sentence
"Fx2 must be non-negative
and less than (fixnum-width)
."
"Fx2 must be non-negative."
Also, the code describing its computation should be changed to:(if (fx>=? fx2 (fx- (fixnum-width) 1)) (fxnegative? fx1) (not (fxzero? (fxand fx1 (fxarithmetic-shift-left 1 fx2)))))
fxcopy-bit
, the
sentence
"Fx2 must be non-negative
and less than (fixnum-width)
."
"Fx2 must be non-negative and less than w - 1."
fxrotate-bit-field
, the
sentence
"Fx4 must be less than the difference between fx3 and fx2."
should be changed to:"Fx4 must be less than or equal to the difference between fx3 and fx2."
fxrotate-bit-field
should be changed to:
(let* ((n fx1) (start fx2) (end fx3) (count fx4) (width (fx- end start))) (fxcopy-bit-field n start end (fxior (fxarithmetic-shift-left (fxbit-field n start (fx- end count)) count) (fxarithmetic-shift-right (fxbit-field n start end) (fx- width count))))))
fl=?
etc. lack the trailing
?
in their names.fldiv
etc, the wording:
"For zero divisors, these procedures may return a NaN or some unspecified flonum."
should be replaced by"In the cases where the mathematical
requirements in section
11.7.3 cannot be satisfied by any number object, either an
exception is raised with condition type
&implementation-restriction
, or unspecified flonums (one
for for fldiv
flmod
, fldiv0
and
flmod0
, two for fldiv-and-mod
and
fldiv0-and-mod0
) are
returned."
flexpt
, the sentence
"If fl1 is zero, then the result is zero."
should be replaced by:"If fl1 and fl2 are both zero, the result is 1.0. If fl1 is zero and fl2 is positive, the result is zero. If fl1 is zero and fl2 is negative, the result may be a NaN, or may be some unspecified flonum."
make-no-infinities-violation
and
make-no-nans-violation
procedures take no
arguments.bitwise-copy-bit
,
"[...] by the ei2 bit of ei3"
should be replaced by"[...] by ei3"
bitwise-copy-bit-field
,
"... fixnum result of the following computation:"
should be replaced by"... result of the following computation:"
bitwise-copy-bit-field
should be
clarified to say "the bits in ei4 from position 0 (inclusive) to position ei3 - ei2 (exclusive)"
instead of just"the corresponding bits in ei4".
"Note, however, that Waddell's
thesis describes slightly different semantics for
bound-identifier=?
- it specifies that for two identifiers to be
equal in the sense of bound-identifier=?
, they must have the same marks and be equal in
the sense of free-identifier=?
, whereas this report requires
instead that they must have the same marks and have the same name."
p => (15 5)should be:
p => (15 . 5)
include
macro
uses
(open-file-input-port fn)to open the file, which would result in a binary input port. Instead, a textual input port should be opened, for example via:
(open-file-input-port fn (file-options) (buffer-mode block) (native-transcoder))
identifier-syntax
is
incorrect and should be as follows:
(define-syntax identifier-syntax (lambda (x) (syntax-case x (set!) [(_ e) #'(lambda (x) (syntax-case x () [id (identifier? #'id) #'e] [(_ x (... ...)) #'(e x (... ...))]))] [(_ (id exp1) ((set! var val) exp2)) (and (identifier? #'id) (identifier? #'var)) #'(make-variable-transformer (lambda (x) (syntax-case x (set!) [(set! var val) #'exp2] [(id x (... ...)) #'(exp1 x (... ...))] [id (identifier? #'id) #'exp1])))])))
hashtable?
should be
obj instead of hashtable -
hashtable?
can be called with any object.hashtable-entries
should
contain an explanatory note saying that the order of the entries
in the result vectors may be different from the example.
enum-set-indexer
should be replaced with "symbol"
to avoid implying that the procedure returned by
enum-set-indexer
accepts arbitrary types of
values.
enum-set-projection
.environment
both lack imports
of (rnrs eval)
.eval
raise an exception with
condition type &assertion
if applied to an
expression containing an assignment to one of the variables in
the environment should be replaced with a requirement that it
raise an exception with condition type &syntax
for consistency with treatement
of similar situations as syntax violations in Section 7.1 of the
base document.