[plt-scheme] namespaces and executables

From: Ivanyi Peter (pivanyi at freemail.hu)
Date: Fri Aug 4 07:33:42 EDT 2006


I have basically finished my language module. My last
problem with
it that I would like to create a self-standing executable.
I also would like to control the namespace. Somehow I cannot
the two.
I can create a module of the language, then compile it

$ mzc --exe simulator.exe simulator.scm

but then I have the full namespace of MzScheme with all
macros and
definitions, including mine. I came up with the following

(define nn 
  (let ([ns (null-environment 5)])
    (parameterize ([current-namespace ns])
      (namespace-require '(file "simulator.scm")))
(current-namespace nn)

which works and restricts the namespace, but in this case I have
a file which is not a module so I cannot compile it into a
How can I combine the two together? How can I have my language
with the limited namespace in a self-standing executbale?
(What I mean
by the limited namespace, that only my functions and macros are
available in the namespace.)

Thanks for any help,

Peter ivanyi

Hihetetlen hétvége Vámos Miklóssal! Augusztus 4-én 16 órától 6-án 24 óráig 25-40% kedvezménnyel vásárolhatja meg a szerző könyveit. http://www.bookline.hu/control/shlist?id=505&affiliate=frehhvkar2985

Posted on the users mailing list.