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

[Q] units and macros in MzScheme



Leo,

> Can one define a macro inside a unit and then export/import it to another
> unit or into the global namespace?

This isn't a dumb question at all.  The problem is what to do with the 
names that the macro depends on.  For instance, the `delay' macro
depends on `make-promise'.  If you export one and not the other, the
macro will no longer work.  Furthermore, it's not clear what it means
to export a *macro* (as opposed to the procedure that implements a
macro), because macros are compile-time entities, whereas units import 
and export run-time values (roughly).

If you want more details on the problems and want to read a draft
paper on the solution, send me email and I'll point you to it.

'shirram