[plt-scheme] Questions about modules, compilation, namespaces, planet and ffi

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Thu Apr 28 08:06:21 EDT 2005

At Thu, 28 Apr 2005 01:11:42 -0200, Bruno Deferrari wrote:
>   And "mreddesigner.ss" looks like this:
> (module mreddesigner mzscheme
>   (load/use-compiled "some-file.ss")
>   ; ... more files
> )

As Eli says, using `load' inside `module' generally isn't the right

In this case, I recommend using `include':

 (module mreddesigner mzscheme
  (require (lib "include.ss")
           (lib "mred.ss" "mred")
           (lib "class.ss")
           (lib "sendurl.ss" "net")
           (lib "pretty.ss")
           (lib "list.ss")
           (lib "string.ss"))

  ;; `include' instead of `load/use-compiled'
  (include "mreddesigner-project-data.ss")

  ;; mreddesigner uses `eval', so export all definitions:
  (provide (all-defined)))

There's one definition collision, which you can fix by renaming
`screen-w' and `screen-h' in "splash-screen.ss".

To compile, instead of using "compile.scm", the simple command

  mzc --zo --auto-dir mreddesigner.ss

should work.


Posted on the users mailing list.