"LoadError: Evaluation into the closed module" with Macro that generates new types and methods

FWIW: This post might be the solution, but since it was using eval in a function, I’m not sure how to apply it to my situation.