[plt-scheme] Using initial-required-module-name

From: Ryan Culpepper (ryanc at ccs.neu.edu)
Date: Thu Jun 14 23:33:21 EDT 2007

On Thu, 2007-06-14 at 20:03 -0700, Mark Smithfield wrote:
> I am attempting to build a unit-test module and a
> metacircular evaluator module (the replacement for
> mzscheme) and a file of tests that unit-tests the
> evaluator I have written.
> 
> Starting w/ this..
> 
> (module module-identifier initial-required-module-name
> body-datum ···)
> 
> and the lambda calculus example in section 12.5 of the
> mzscheme language docs, I have been able to create a
> module that uses a value other than mzscheme for
> initial-required-module-name. But it only works if the
> replacement for mzscheme, the module that uses it and
> the code that uses the both of them are in the same
> file. 
> 
> Perhaps this is a wrongheaded approach, and I am open
> to suggestions, but I would still like to know how to
> create a module that can replace mzscheme w/o being in
> the same file?

The initial module can be any module path. For example, to write a
module in the language containing everything from DrScheme's "Pretty
Big" language level, do this:

  (module m (lib "plt-pretty-big.ss" "lang") ...)

For Typed Scheme (a language available through PLaneT):

  (module m (planet "typed-scheme.ss" ("plt" "typed-scheme.plt" 1)) ...)

For the module named 'mylang' in the "mylang.ss" file in the same
directory, do this:

  (module m "mylang.ss" ...)

And so on.

Ryan




Posted on the users mailing list.