Thanks Phillip for providing a very thorough example. There is much to digest in there, and some novel ideas I didn't know about (attaching values as attributes to syntax).
What wasted a lot of time for me is that, despite the macroexpander's results, the macro works as expected in the REPL. If you paste my original macro into DrRacket, run it, then type '(hex a)' into the REPL you get the expected result. In this case, '(expand (hex a))' doesn't help. This is possibly due to something like a combination of phases, environments and top-level bindings, but I couldn't figure it out. In any case, thanks again. I will learn from your example ideas that I hope will help future me. -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/291a7036-3f19-4e72-b093-26eed20aa82e%40googlegroups.com.