[plt-scheme] update on R6RS support

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Thu May 1 11:25:59 EDT 2008

PLT Scheme's R6RS is now (in SVN) backed by a minimally competent test
suite --- and there are many fewer bugs than there were a week ago.
The test suite is in

 collects/tests/r6rs


Also, as of a week or two ago, the R6RS document is wired into to the
PLT documentation. For example, running DrScheme's Check Syntax on

  #!r6rs
  (import (rnrs))
  cons

provides a link from `cons' to the R6RS description of `cons'.


Known non-conformance with the standard in the current implementation:

 * When `guard' catches an exception that no clause matches, the
   exception is re-`raise'ed without restoring the continuation to the
   one that raised the exception.

   This difference can be made visible using `dynamic-wind'. According
   to R6RS, the following program should print "in" and "out" twice,
   but each prints once using PLT Scheme:

        (guard (exn [(equal? exn 5) 'five])
           (guard (exn [(equal? exn 6) 'six])
             (dynamic-wind
               (lambda () (display "in") (newline))
               (lambda () (raise 5))
               (lambda () (display "out") (newline)))))

   Along similar lines, continuation capture and invocation within an
   exception handler is restricted. Unless the exception is raised
   through @scheme[raise-continuable], a handler can escape only
   through a continuation that is a tail of the current continuation,
   and a continuation captured within the handler cannot be invoked
   after control escapes from the raise.

 * Currently, inexact numbers are printed without a precision
   indicator, and precision indicators are ignored on input (e.g.,
   `0.5|7' is read the same as `0.5').

 * Word boundaries for `string-downcase', `string-upcase', and
   `string-titlecase' are not determined as specified by Unicode
   Standard Annex #29.

 * When an identifier bound by `letrec' or `letrec*' is referenced
   before it is bound, an exception is not raised; instead, the
   reference produces #<undefined>.

 * The bindings in a namespace produced by `null-environment' or
   `scheme-report-environment' correspond to R5RS bindings instead of
   R6RS bindings. In particular, `=>', `else', `_', and `...' are not
   bound.


Matthew



Posted on the users mailing list.