[plt-scheme] How do you import external PLT functionality into an R6RS program?

From: Ryan Newton (rrnewton at gmail.com)
Date: Fri May 2 13:50:08 EDT 2008


I've ported my application to R6RS and am running it with Ikarus/ 
Larceny.  It depends on some nonstandard features (there's still a  
lot missing from R6RS), which I have encapsulated in a compat.sls  
(compat.{ikarus,larceny,mzscheme}.sls) library.

However, in trying to write the .mzscheme.sls version (using, I haven't figured out how to pull in broader mzscheme  
functionality (e.g. the 'random' procedure).  I believe I should need  
to write (import X) for some X.  For example, in larceny, X= 
(primitives p1 p2 ...), in ikarus, X='(ikarus)'.

There's a section on scheme interoperability in the docs, but it's  
focused on using R6RS modules from the outside, not the reverse:



P.S. As a separate matter, plt-r6rs doesn't seem to be working for me  
in the version I'm using.  I get this error:

  $ plt-r6rs ws/compat/compat.mzscheme.sls
procedure *read-syntax: expects 6 arguments, given 2: #<path:/afs/ 
compat.mzscheme.sls> #<input-port:/afs/csail.mit.edu/u/n/newton/ 

Ditto when I try to run it in other modes like --compile:

$ plt-r6rs --compile test.sls

  [Compiling /afs/csail.mit.edu/u/n/newton/WaveScope/code/wavescript/ 
procedure *read-syntax: expects 6 arguments, given 2: #<path:/afs/ 

Posted on the users mailing list.