[gambit-list] Re: Meroon and Gambit

Bradley Lucier lucier at math.purdue.edu
Wed May 4 22:29:34 EDT 2005


On May 4, 2005, at 8:36 PM, Eric Merritt wrote:

>   That works for the Meroon system, but what about Meroon classes
> defined by the user. Doesn't Meroon generate a few macros when classes
> are defined? In this case you then have macro code mixed with
> non-macro code. So if you 'load' it the macros aren't available
> outside of the file. If you 'include' it the non-macro portion of the
> code could be a duplicated if other code in your system also includes
> that object definition.

Ah, now I understand your question, sorry for being dense before.

Through a bit of hackery, Meroon macros are available whether loaded or 
included.  See meroon.gsc for the gory details.  (Basically, each 
meroon-macro definition in a file A.scm  [which is available to use in 
other definitions in A.scm] is also "eval"-ed, which makes it available 
to  use in definitions in other files after A.scm or A.o1 is 
"load"-ed.)

I would recommend you just "include" or "load" each file with Meroon 
class/generic/method definitions once.

Brad




More information about the Gambit-list mailing list