Hello, I would like to write two seemingly simple macros and I found no way to do it.
(my-let ((x 2)) (begin (begin (begin (access x) (access y))))) I would like the (access) macro to know at compile (expansion) time that x is up there in (my-let) macro and y is not. I tried the following: - save information about 'x during (my-let) expansion in a parameter (present in expander but not in expanded code) and check that parameter in (access). This does not seem to work, probably because of the way expansion works. - attach information as a property to syntax object generated by (my-let), then bring it all the way down (that requires redefining begin) and get it back from syntax object in (access). That works, but is a pain. - explicitly call (expand-syntax) for (my-let)'s body in (my-let)'s expansion. Does not work because (access) is not yet available at that point. - find and read "Macros that work together" my Flatt et al. Well, I did try to find what I need, until the code has switched from Racket to some other fancy language and then I am stuck. Any advice please? Best regards, Dmitry -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.