On Tue, 6 Mar 2007, Andre van Tonder wrote:
On Tue, 6 Mar 2007, Aubrey Jaffer wrote:
By requiring phased processing of libraries, R5.92RS has
disenfranchised "pure interpreters", apparently for the sake of
macros.
This is not accurate. At least one of the reference implementations of
libraries and macros, at
http://www.het.brown.edu/people/andre/macros/index.html
runs as is in both the MzScheme and the Petite Chez interpreters' REPLs,
using only the ability of these implementations to interpret vanilla r5rs
code.
To be concrete, the implementation defines a procedure called $repl, so that
one can type the following sequence of forms into one's interpreter of choice
to execute the example in the r6rs document, with the correct semantics, as
follows:
($repl
'(
(library (my-helpers id-stuff)
(export find-dup)
(import (r6rs))
(define (find-dup l) .......))
($repl
'(
(library (my-helpers value-stuff)
(export mvlet)
.........)))
($repl
'(
(library (let-div)
(export let-div)
.......)))
($repl
'(
(program
(import (let-div) (r6rs))
(let-div 5 2 (q r) (+ q r))
)))
==> 3
Modifying an interpreter so that one does not have to type the
($repl '( --- )) each time should be trivial.
Andre
_______________________________________________
r6rs-discuss mailing list
[email protected]
http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss