[gambit-list] builtin syntax, namespaces and expansion loops

Marc Feeley feeley at iro.umontreal.ca
Sat Jun 25 13:16:43 EDT 2005


You might try something like this:

(##namespace ("foo#"))

(##define-macro (quasiquote x)
   (##namespace ("" display quasiquote))
   (display "called quasiquote\n")
   `(let () (##namespace ("" quasiquote)) (quasiquote ,',x)))

I'm not sure it solves your specific problem though.

Marc

On 24-Jun-05, at 9:12 AM, Christian wrote:

> Hello
>
> I've noticed that one cannot refer to builtin syntax using fully  
> qualified notation (something like foo#quasiquote isn't defined; so  
> builtin syntax is present in every namespace but not accessible  
> with any full qualification) and one thus cannot write macros  
> substituting the builtin syntax with something else and then still  
> call the original syntax in the generated code:
>
> (define-macro (quasiquote . l)
>    (display "quasiquote called\n")
>    `(quasiquote , at l))
>
> `1
> => leads to infinite loop, and there's no apparent way around that.
>
> Additionally, this loop cannot be terminated by hitting ctl-c,  
> which means the whole process has to be terminated.
>
> Is there a way to write the above quasiquote wrapper so that it works?
>
> Thanks
> Christian.
> _______________________________________________
> Gambit-list mailing list
> Gambit-list at iro.umontreal.ca
> http://mailman.iro.umontreal.ca/mailman/listinfo/gambit-list
>




More information about the Gambit-list mailing list