[plt-scheme] migrating non-modular mzscheme programs to PLT version 4

From: Noel Welsh (noelwelsh at gmail.com)
Date: Sun Nov 16 05:49:15 EST 2008

If you add

  #lang scheme

  (provide (all-defined-out))

to all your leaf modules, and

  #lang scheme

  (require "dependencies.ss")
  (provide (all-defined-out))

to all non-leaf modules (replacing "dependencies.ss" with the
appropriate file names, you'll essentially be in a world where all
bindings exist in the same namespace.  Perhaps that will do what you


On Sun, Nov 16, 2008 at 5:36 AM, H David Goering <hdg at cox.net> wrote:
> Unlike MzScheme of version 3, Module seems to require that the top-level
> file of a multi=file program contain a module. Adding '(require mzscheme)'
> is not sufficient.
> Converting the top-level file to a module is no hardship, but 'load' and
> 'load/use-compiled' now seem to require that arguments refer to modules
> rather than mere files. If the reference is not a module the error message
> "compile: bad syntax; function application is not allowed, because no #%app
> syntax transformer is bound" is seen. Adding '#lang mzscheme' fixes that
> problem but fragments the namespace in a regrettable way.
> Will Module accept a multi-file mzscheme program that is not modularized?
>  Or one that is treated as a single module?
> Thanks,
> David

Posted on the users mailing list.