This site is a static rendering of the Trac instance that was used by R7RS-WG1 for its work on R7RS-small (PDF), which was ratified in 2013. For more information, see Home.

Source for wiki R7RSSmallErrata version 3

author

cowan

comment


    

ipnr

127.10.177.1

name

R7RSSmallErrata

readonly

0

text

Errata from the [http://trac.sacrideo.us/wg/attachment/wiki/WikiStart/r7rs.pdf final draft of R7RS]:

1.  The claim in Section 3.1, paragraph 2, that all variable binding constructs can be explained in terms of `lambda` does not apply to top-level bindings.

2.  Section 7.1.5 doesn't make it clear that a top-level `syntax-rules` pattern must be a list pattern, not a vector pattern or an identifier pattern.

3.  The procedure `boolean=?` is defined to return `#t` if the arguments are all booleans and are either all `#t` or all `#f`.  The words "are all booleans and" incorrectly suggest that the value is `#f` if at least one argument is not a boolean.  In fact it is an error to apply `boolean=?` to non-booleans.

4. In Section 4.1.2, the examples `'#` and `#` should be `'#\a` and `#\a` respectively.

5. In section 7.1, the escape sequence `\|` is not shown as permitted in strings.  The list in Section 6.7 shows that it is equivalent to `|`.  This makes the same escape sequences valid in both strings and symbols.

6.  The syntax-rules definition of `case` in Section 7.3 is incorrect; the fourth syntax rule must be moved after the fifth to avoid an improper match against the fourth rule when `=>` is present.  Here is the correct version:

{{{
 (define-syntax case
   (syntax-rules (else =>)
     ((case (key ...)
        clauses ...)
      (let ((atom-key (key ...)))
        (case atom-key clauses ...)))
     ((case key
        (else => result))
      (result key))
     ((case key
        (else result1 result2 ...))
      (begin result1 result2 ...))
     ((case key
        ((atoms ...) => result))
      (if (memv key '(atoms ...))
          (result key)))
     ((case key
        ((atoms ...) => result)
        clause clauses ...)
      (if (memv key '(atoms ...))
          (result key)
          (case key clause clauses ...)))
     ((case key
        ((atoms ...) result1 result2 ...))
      (if (memv key '(atoms ...))
          (begin result1 result2 ...)))
     ((case key
        ((atoms ...) result1 result2 ...)
        clause clauses ...)
      (if (memv key '(atoms ...))
          (begin result1 result2 ...)
          (case key clause clauses ...)))))
}}}

time

2013-09-30 10:48:49

version

3