It's been a while since I thought about this, but I used to use (pp
(syntax-quote ...)) to see the expansion of a macro. I think it still works.

On Fri, Dec 4, 2015 at 7:50 PM, fedekun <fedekil...@gmail.com> wrote:

> I apologize if this has been asked before but I can't find anything about
> it in the archives or googling.
>
> Is there something like Lisp's macroexpand-1 for MIT Scheme? It's quite
> hard to debug my first macros. How do you guys debug your macros?
>
> Currently I'm just playing around with a macro to define hashes. I want to
> transform:
>
> (hash '(a 1 b 2))
>
> Into:
>
> ((lambda ()
>   (let ((t make-strong-eq-hash-table))
>            (hash-table/put! t 'a 1)
>            (hash-table/put! t 'b 2)
>            t)))
>
> For that I worked on this macro
> <https://gist.github.com/gosukiwi/1584bf0b7be5e14be1b3>, which doesn't
> work and I'd really love to be able to debug! The idea of the macro is to
> return a self-executable lambda which returns a reference to a hash-table.
>
> Thanks for your time!
>
> _______________________________________________
> MIT-Scheme-users mailing list
> MIT-Scheme-users@gnu.org
> https://lists.gnu.org/mailman/listinfo/mit-scheme-users
>
>
_______________________________________________
MIT-Scheme-users mailing list
MIT-Scheme-users@gnu.org
https://lists.gnu.org/mailman/listinfo/mit-scheme-users

Reply via email to