[R6RS] Scripts and toplevel code
Anton van Straaten
anton at appsolutions.com
Fri Aug 18 01:20:04 EDT 2006
Matthew Flatt wrote:
> Do you mean to attach an initial "language" to the code, expand the
> language spec plus code to a `library' form with a fixed body syntax,
> and then have tools process only expanded code?
Exactly.
> In that case, you need
> a reliable way to specify languages, but maybe the library system
> itself could help with that.
I was thinking that to allow brand-new top-level forms, the language
would really need to be specified at the level of the expansion tool, so
you might execute a shell command like this:
expand-scheme -lang mylang-macros.scm myprogram.scm
...which would expand the top-level forms of myprogram.scm, using
whatever macros are defined in mylang-macros.scm, stopping expansion
when a library form is reached.
> In any case, it sounds plausible to me. :)
Are you seconding my retroactive motion to add this to R6RS? ;)
Anton
More information about the R6RS
mailing list