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

**URL:** <https://discourse.julialang.org/t/loaderror-evaluation-into-the-closed-module-with-macro-that-generates-new-types-and-methods/94994>\
**Category:** General Usage\
**Tags:** metaprogramming\
**Created:** [February 22, 2023, 3:24am UTC](https://discourse.julialang.org/t/loaderror-evaluation-into-the-closed-module-with-macro-that-generates-new-types-and-methods/94994 "2023-02-22T03:24:13Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![mrufsvold](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mrufsvold/32/31600_2.png) [@mrufsvold](https://discourse.julialang.org/u/mrufsvold)\
**Post date:** [February 22, 2023, 3:26am UTC](https://discourse.julialang.org/t/loaderror-evaluation-into-the-closed-module-with-macro-that-generates-new-types-and-methods/94994/2 "2023-02-22T03:26:35Z")

</div>

FWIW: [This post](https://discourse.julialang.org/t/use-of-eval-in-closed-module-and-incremental-compilation-may-be-broken/30028/6) might be the solution, but since it was using `eval` in a function, I’m not sure how to apply it to my situation.

---

_[View the full topic](https://discourse.julialang.org/t/loaderror-evaluation-into-the-closed-module-with-macro-that-generates-new-types-and-methods/94994)._
