[Larceny-users] Larceny basics

Dan Muresan danmbox at gmail.com
Sat Sep 1 12:07:49 EDT 2007


> Note that test.sch explicitly expresses, via require, that it depends on 
> SRFI-8, but in Larceny, the require procedure is a runtime construct 
> rather than a special form handled during expansion of test.sch.  

Ah, I understand.

SISC has had the same problem for ages, then one day they decided to 
make the compiler detect (require ...) invocations and follow them at 
compile time.

Chicken compiles .scm to .so files, which obviously don't preserve 
macros. So Chicken has (require-for-syntax ...) which loads just the 
macros from a .scm file; alternatively you can package extensions as 
"eggs", which can contain more elaborate loading instructions.

I think the simplest solution in Larceny is to write a 
(require-for-syntax) macro, perhaps based on your expanding-the-source 
approach.

Nicer would be to make (compile-file) follow (require ...) invocations.

Hacking require-extension seems (from what you described) a tedious 
approach, and is certainly not what other implementations do (but then, 
I'm a Larceny newbie, so what do I know).


Best,
Dan



More information about the Larceny-users mailing list