[plt-scheme] Modules/Libraries in MZScheme and R6RS

From: Filipe Cabecinhas (filcab at gmail.com)
Date: Sun May 11 16:26:35 EDT 2008

Hi

I have a few questions regarding modules in MzScheme and R6RS:

- How can I import SRFIs into an R6RS program/library? (import (srfi  
1)) doesn't work.

- Can I do something like (export (all-from-out <another-module>)) in  
MzScheme's R6RS language? I couldn't find anything like that in the  
standard so, maybe I have to name every single symbol to export.

- Speaking of export. Now we have forms like (provide (all-from- 
out ...)), I know previously we had all-from and all-from-out in  
require (I don't remember which one was the oldest, but I had some  
files with those and now they broke), but now we have all-from in # 
%require and all-from-out in require (by the documentation, it seems  
all-from can't receive another spec, only a path). Will it be like  
that from now on (require (*-in ...)) and (provide (*-out ...)), or  
will we be able to do without the '-in/-out suffixes eventually? I  
don't think they make it harder to understand because they just get in  
the way. If it's a require, it's -in, if it's a provide, it's -out, no  
need in having that in every form (unless there's something I'm  
missing, of course).

- How can I refer to an MzScheme module/R6RS library like (require  
"base.scm") in R6RS? If I have to have it in the collects dir, is  
there any way I can add a directory to the collects' search path  
through DrScheme? I suppose I can add a dir to the collects' search  
path (if it's possible) and then do an (import (base)), am I correct?

I think that's it, for today. ;-)

Thanks for the help,

   - Filipe Cabecinhas


P.S: In section 2.2 of the Guide ( http://docs.plt-scheme.org/reference/require.html#(form 
~20(~23~25kernel~20~23~25require)) ), you have a typo:
(only rw-module-path id ...)

instead of
(only raw-module-path id ...)





Posted on the users mailing list.