Perhaps I could import the library that maybe-exports things into my script, and then catch the exception when I try to redefine any of the imports as syntax for raising an exception on reference...? I think that would define just the missing exports, which could work.
On Sun, Jun 14, 2009 at 8:04 PM, Ramana Kumar<[email protected]> wrote: >> Why don't you just define these certain variables such that you get a >> run-time exception if you attempt to reference them? Your exception >> handler can then recognize this exception and handle it appropriately, >> e.g., by aborting the computation. This is how I usually define these >> not-yet-defined-really variables. > > I will try to take up this suggestion and see if it can work. One > problem I immediately run into is that some of the exports that may or > may not be present are macros (and others are values). Presumably I > would have to define them all as macros that expand either to raising > the exception or to referencing the imported value... but how to > reference an imported macro? >
