Hi, I have written a #lang, which works ok when it is in its own file. Now, I'd like to make it embedded through a macro such as '(my-lang ...)'
What I would like is essentially expand that: #lang racket ... standard racket source ... (my-lang ...) ... standard racket source ... to that: #lang racket ... standard racket source ... ... racket source expanded from my-lang ... ... standard racket source ... But there's a problem, because although the 'my-lang' macro will expand my-lang code to racket code, it must expand to a valid expression, i.e: (define-syntax (my-lang stx) #`(my-lang-expand (open-input-string (cadr (syntax->datum stx))))) could yield '(begin (define a 3) a)' while I would want '(define a 3) a' so that the 'a' from 'my-lang' becomes a valid top-level identifier in the whole (racket) program. I understand that this impllies that the '(my-lang ...)' macro would then modify its parent expression (the main program), so I guess that means breaking the normal expansion process. Is that possible? Is there a better way? Thanks! Raoul -- 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/32bfb6d3-715c-43e1-b198-0b486c2f279d%40googlegroups.com.