R6RS Standard Libraries for R7RS Systems
This package makes one or more of the R6RS standard libraries available for use by R7RS libraries and programs.
The R6RS standard specifies a set of (rnrs *)
libraries.
Most of those libraries have been ported to R7RS and placed in the
(r6rs *)
hierarchy. (This trivial renaming avoids
conflict with the original R6RS libraries, which are provided by
some implementations of the R7RS.)
The R6RS documentation of its (rnrs *)
libraries
serves as primary documentation for the corresponding
(r6rs *)
libraries:
-
The
Revised6 Report
on the Algorithmic Language Scheme
specifies the
(rnrs base)
library. -
The
Revised6 Report
on the Algorithmic Language Scheme
— Standard Libraries
specifies all other
(rnrs *)
libraries.
Implementation
If an R7RS system provides an (rnrs *)
library, as
detected by cond-expand
, the corresponding
(r6rs *)
library may just import the R6RS library
and re-export the imported identifiers.
Otherwise the R6RS library is approximated by portable R7RS code.
Tests
The (r6rs *)
libraries have been tested using
test programs derived from Racket's R6RS test suite.
These test programs have not been refactored to make them
compatible with Snow's standards for test programs.
Bugs
Please report bugs found within the (r6rs *)
libraries at
Larceny's GitHub site.
(Caveat: The current test suite detects several bugs that lie
within particular implementations of the R7RS, not within the
(r6rs *)
libraries themselves.)
As with most ports from one language standard to another, some compromises were necessary:
-
(r6rs base)
exportsidentifier-syntax
, but it's just a stub that raises a syntax exception if you try to use it. -
(r6rs io ports)
exports stubs for several procedures and syntaxes that cannot be implemented portably in R7RS (small). -
The R7RS implementation of
(r6rs hashtables)
uses(rnrs hashtables)
if that library is available. Otherwise it implements R6RS hashtables on top of SRFI 69 hash tables, provided(srfi 69)
is available. Otherwise it implements R6RS hashtables on top of the reference implementation of SRFI 69, which is not very good.