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

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Fri May 2 15:56:56 EDT 2008

At Fri, 2 May 2008 13:50:08 -0400, Ryan Newton wrote:
> However, in trying to write the .mzscheme.sls version (using  
> 3.99.0.23), 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:
> 
>    http://docs.plt-scheme.org/r6rs/Scheme_Interoperability.html

It works both directions. If you want to import from `scheme/base', for
example, use `(import (scheme base))'.

> 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/ 
> csail.mit.edu/u/n/newton/WaveScope/code/wavescript/src/ws/compat/ 
> compat.mzscheme.sls> #<input-port:/afs/csail.mit.edu/u/n/newton/ 
> WaveScope/code/wavescript/src/ws/compat/compat.mzscheme.sls>

Thanks for the report --- fixed in SVN.

matthew



Posted on the users mailing list.