macro, duplicate definition warning

Robert Nikander rob@encodia.biz
Tue Mar 29 02:06:00 GMT 2005


Dominique,

On Mar 28, 2005, at 5:15 PM, Dominique Boucher wrote:
> Have you tried not  'requiring' <request> in <use>?

That works and it is probably the best thing I can do right now.  (Or 
go with a defmacro, which also seems to work).   I should say that I am 
using an older kawa for this.  Maybe this is fixed in the newest 
versions.

The reason to not remove the (require <request>) from <use> is that 
then <macro> has to import and re-export all of <request>, for those 
who might need it.  But what about those who don't want it?  And the 
maintainer of <macro> has to watch <request> and make sure he is always 
re-exporting all the bindings.  (I usually use module-export to keep 
some bindings private).

In general you'd like to be able to do the following, even if 
MyAppHelp.scm defines a macro using Utilities.scm.

MyApp.scm ---------------------------------> Utilities.scm
        \---------> MyAppHelp.scm ------->-----/


>
> Also, why don't you put the 'define-web-func' macro in <request>? This 
> way,
> you will only need to require a single module in <use>.
>

This works in the sample, but in the real code <request> is a utility 
layer that I am trying to build <macro> on top of.


> Hope this helps!
>
> Dominique
>


Thanks,

Rob



More information about the Kawa mailing list