[plt-scheme] dynamic-require module question
At Tue, 15 May 2007 18:31:26 -0400, Robert Nikander wrote:
> If I want to load files defined in a custom language, is there a way
> that I can skip the module form? In other words, can I replace this:
>
> --- file1.cust-lang ---
> (module "custom-language.scm"
> a b c)
> --- load-it.scm ---
> (dynamic-require "file1.newlang")
> ---
>
> with something like this:
>
> --- file1.cust-lang ---
> a b c
> --- load-it.scm ---
> (dynamic-require-??? "file1.newlang" "custom-language.scm")
No, not currently. You can trade the `(module ...)' wrapper for a
`#reader' prefix, like this:
--- file1.cust-lang ---
#reader("custom-language-reader.scm")
a b c
but that's as far as it goes.
`require' might one day support a mapping from file suffixes to
implicit `#reader' headers, but I'm not sure.
Matthew