[plt-scheme] Modules; including files

From: Ed Cavazos (proteus at theworld.com)
Date: Thu Mar 20 05:52:05 EST 2003

Every usage of the MzScheme that I've seen goes something like this:

(module foo
	mzscheme
	<module body>)

Where <module body> is a series of definitions, evaluations, etc. Is
it possible to say in the <module body> something like "include
definitions from file xyz.scm" where xyz.scm is a "plain old Scheme
file", i.e. does not contain a module declaration?

Why do I want this?

* Wrapping code inside a module declaration causes the the entire file
  to get indented. This point could be seen as cosmetic and therefore
  not too important. However, I do try to keep my code no wider than
  80 characters and this eats up a couple of characaters right from
  the start.

* Wrapping Scheme code in a module declaration results in a file which
  is not compatible with other Scheme systems. I could have a file
  xyz.scm which contains pure R5RS code. This file could be directly
  useable by any R5RS system. If I were to wrap the xyz.scm in a
  module declaration, I'd lose this minor sense of portability.

Ed



Posted on the users mailing list.