[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [plt-scheme] Annotative forms in expand-program?



The simple answer: apply your compiler to those other modules! 

Compiling a (n expanded) module is actually not too complex. They are
just basically a big letrec, since your compiler only accepts fully
expanded programs -- even though there may be syntax definitions in the
compiled modules, but they are only used when expanding other modules
(which your compiler doesn't need to do anyways).

There is some complexity in finding the compiled versions of your
modules (ie, reimplementing `require'). You might want to consider what
Setup PLT does. It creates "compiled" subdirectories of each collection
and stores the compiled version of the files there.

As far as your compiler goes, I would start with the MzScheme language
before scaling up (probably you already plan to do that).

Jacob Matthews, Luke Hoban and I were wrestling with these same
problems last summer when building a cgi compiler and we will probably
return to that at some point in the future. I had hoped that you could
avoid them, but maybe you cannot, if you plan to use the teaching
languages (their implementations are actually pretty sophisticated).

Robby