[plt-scheme] Modules; including files

From: John Clements (clements at brinckerhoff.org)
Date: Thu Mar 20 09:28:58 EST 2003

On Thursday, March 20, 2003, at 06:39  AM, Michael Sperber [Mr. 
Preprocessor] wrote:

>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>>>>>> "Ed" == Ed Cavazos <proteus at theworld.com> writes:
> Ed>   For list-related administrative tasks:
> Ed>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme
> Ed> Every usage of the MzScheme that I've seen goes something like 
> this:
> Ed> (module foo
> Ed> 	mzscheme
> Ed> 	<module body>)
> Ed> Where <module body> is a series of definitions, evaluations, etc. 
> Is
> Ed> it possible to say in the <module body> something like "include
> Ed> definitions from file xyz.scm" where xyz.scm is a "plain old Scheme
> Ed> file", i.e. does not contain a module declaration?
> Yes.  Just say
> (require (lib "include.ss"))
> (include "<file>")

Since (I believe) the include form simply performs a textual insertion, 
keep in mind that you won't be able to have two definitions of
the same identifier, as you could at the top level.

Also, if you remove 'module' from the list of 'lambda-like' keywords in 
the preference panel.  Then, if you put a newline right after the 
'module' (that is, before specifying the language name), you'll find 
that the remaining lines of the file are indented by only one character.


Posted on the users mailing list.