[gambit-list] Debugging macros

Guillaume Cartier gcartier at jazzscheme.org
Sat Jun 9 14:34:27 EDT 2007

Thanks Adrien. I do get the prompt but with no backtrace available... 
e.g. ,b will not report the stack that lead to the problem inside the 
macro expander.

In the meantime though, I found out that simply wrapping the code I want 
to expand inside eval does the trick.

(foo) -> no backtrace available
(eval '(foo)) -> it works!

Marc, can you tell us if this trick of wrapping eval the macro is clean 
and why it works?



Adrien Pierard wrote:
> On Sat, Jun 09, 2007 at 12:32:32PM -0400, Guillaume Cartier wrote :
>> If an error occurs during the expansion of a macro, Gambit doesn't start 
>> a new repl to enable me to debug the code. Is there a way to enable 
>> this? It would be really helpfull for me as some of my macros are really 
>> complex.
> gsi -:dar macro.scm
> should give you gambit's prompt after failing.
> (I don't really know what this option means or does, but I use it a lot :D)
> Adrien

More information about the Gambit-list mailing list