[plt-scheme] Wrapping non-PLT code in modules

From: Erich Rast (Erich.Rast at t-online.de)
Date: Tue Oct 29 10:29:27 EST 2002

Am Dienstag, 29.10.02, um 16:17 Uhr (Europe/Berlin) schrieb Anton van 
Straaten:

>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>
> I have some code written for R5RS that I'd like to be able to wrap in 
> a PLT
> module, without modifying the original source.  Is that possible, and 
> if so,
> how do I do it?
>
> I tried a few things (in v202) such as the following:
>
> (module wrap-standard-code mzscheme
>   (load "some-standard-scheme.scm") ; can't use require, not loading a
> module
>   (provide oogle boogle bargle))
>

That looks right, except I would recommend not to use load. Put the 
other stuff into a module as well, and require it in you module (or put 
it into the module if it belongs there).

Here's a list of things you might want to check:

  Have you...

... used a filename like "wrap-standard-code.scm" for your module 
declaration of wrap-standard-code?

...used all lowercase filenames (or consistent case everywhere)?

...required everything you need inside your module declaration, such as 
(require (lib "class.ss")) or (require (lib "mred.ss" "mred")?

...checked that your module files such as "wrap-standard-code.scm" is 
in a path the module resolver can find, e.g. in the same directory as 
the file that requires the module?

Greetings,

Erich



Posted on the users mailing list.