# How to include module for a enum?

**URL:** <https://forum.crystal-lang.org/t/how-to-include-module-for-a-enum/8438>\
**Category:** Help & Support\
**Created:** [September 29, 2025, 2:07pm UTC](https://forum.crystal-lang.org/t/how-to-include-module-for-a-enum/8438 "2025-09-29T14:07:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![aiac](https://avatars.discourse-cdn.com/v4/letter/a/db5fbb/32.png) [@aiac](https://forum.crystal-lang.org/u/aiac)\
**Post date:** [September 29, 2025, 2:07pm UTC](https://forum.crystal-lang.org/t/how-to-include-module-for-a-enum/8438/1 "2025-09-29T14:07:14Z")

</div>

```crystal
module A
end

enum B
  Bob
end

```

---

<div class="post-metadata">

**Author:** ![straight-shoota](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/straight-shoota/32/36_2.png) [@straight-shoota](https://forum.crystal-lang.org/u/straight-shoota)\
**Post date:** [September 29, 2025, 2:24pm UTC](https://forum.crystal-lang.org/t/how-to-include-module-for-a-enum/8438/2 "2025-09-29T14:24:38Z")

</div>

`enum` currently does not support including a module.  
There is a feature request for this, tracked at [Add include and extend to Enum · Issue #8946 · crystal-lang/crystal · GitHub](https://github.com/crystal-lang/crystal/issues/8946)

Depending on what you actually need this for, you could consider macros as a workaround for sharing code between multiple types.
