[plt-scheme] domain language hacking, and arguments with the module system

From: Daniel Hagerty (hag at linnaean.org)
Date: Thu May 1 11:22:00 EDT 2003

    I've been hacking on a domain language in my copious free time;
mzscheme seems rather well suited for this.  I only wish I were more
competent at it.

    I'm having a lot of trouble with how I would like to interact with
the module system.  mzscheme's module system looks like it'll give me
exactly what I want, but there are devils in the details.

    I want to be able to say things like
(define foo-release
  "foo_stable_2003_02_19_beta_RELEASE_2003_03_12")
(define bar-release
  "bar_stable_2003_02_19_beta_RELEASE_2003_02_19")

(require (release foo-release "foo.ss"))
(require (release foo-release "baz.ss"))
(require (release bar-release "bar.ss"))


    which seems a little problematic given the compile time nature of
require.  I've been flailing around at this, but thus far have
failed to come up something that actually works.  I can get something
that works a little further with something like

(define-release ...)

where define-release is a macro that communicates with the
module-namespace-resolver through a shared module, but that still doesn't
work.

Playing around with printf'ing the world, and trying to understand the
exact sequence of when modules get compiled/evaled and particurlarly
the module-name-resolver and its data module give hints as to the
nature of the problem, but I'm at a loss how to get it to do what I
want.  I don't know if I'm going about this the right way, or if I
want is readily achievable.

Any free clues for the clueless?  If I need to explain the bigger
picture of "why are you trying to do this to yourself?", I can do so.


Posted on the users mailing list.