[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Some Schemes support compile-time source inclusion. Chez
Scheme has "include", which I've recently added to Kawa.
Often you want to include a file relative to the current
file, which suggests an include-relative syntax form.
To implement include-relative you'd need a "source-vicnity" concept.
This of course would have to be a macro, rather than a function.
But there is a complication: the source we want to be relative to
is not the implementation of include-relative, where the source-vicinity
form appears, but the source containing the include-relative form.
So this suggests a "source-vicinty" form that takes syntax form.
Chez Scheme and PLT (and probably others) have a way to extract
these using "source annotations"; Kawa also has a mechanism.
Unfortunately, many Scheme implementations may be unable to
extract the "source-vicinity" of a form, but a (source-relative PATH)
form may be possible to standardize. At least it should be possible
to standardize include and include-relative - but probably in a