Returning a module expression from a macro to be evaluated at a different module

You can’t do that. A macro cannot do more than you could by typing code. And you cannot define a module in Y and expect it to be in X. You could eval into any other module, as you found out in the other thread. But as stated there, that is bad style. I’m pretty sure that there is another solution to you problem though…

1 Like