# Normal variants from ATD

**URL:** <https://discuss.ocaml.org/t/normal-variants-from-atd/10631>\
**Category:** Learning\
**Tags:** atd\
**Created:** [October 13, 2022, 3:09pm UTC](https://discuss.ocaml.org/t/normal-variants-from-atd/10631 "2022-10-13T15:09:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nhuber](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/nhuber/32/3939_2.png) [@nhuber](https://discuss.ocaml.org/u/nhuber)\
**Post date:** [October 13, 2022, 3:09pm UTC](https://discuss.ocaml.org/t/normal-variants-from-atd/10631/1 "2022-10-13T15:09:14Z")

</div>

Hi!

I have a short question regarding the usage of [ATD](https://github.com/ahrefs/atd).

When I define something like

```ocaml
type color = [Red | Green | Blue]

```

in an ATD file I get the following datatype generated by atdgen:

```ocaml
type color = `Red | `Green | `Blue 

```

Is there a way of getting normal variants instead of polymorphic variants?

Thanks!

---

<div class="post-metadata">

**Author:** ![nojb](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/nojb/32/519_2.png) [@nojb](https://discuss.ocaml.org/u/nojb)\
**Post date:** [October 13, 2022, 3:33pm UTC](https://discuss.ocaml.org/t/normal-variants-from-atd/10631/2 "2022-10-13T15:33:22Z")

</div>

> [@nhuber](#):
>
> Is there a way of getting normal variants instead of polymorphic variants?

Yes:

![image](https://us1.discourse-cdn.com/flex020/uploads/ocaml/original/2X/3/3455cc572178d09cb3ad33d1c0b743b53e09a1ab.png)

Read the manual for more: [OCaml Support - atdgen — atd documentation](https://atd.readthedocs.io/en/latest/atdgen.html#sum-types)

Cheers,  
Nicolas

---

<div class="post-metadata">

**Author:** ![nhuber](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/nhuber/32/3939_2.png) [@nhuber](https://discuss.ocaml.org/u/nhuber)\
**Post date:** [October 13, 2022, 3:53pm UTC](https://discuss.ocaml.org/t/normal-variants-from-atd/10631/3 "2022-10-13T15:53:41Z")

</div>

I must be blind … I read the manual multiple times but somehow missed that. Thanks!
