# Ppx\_variants\_conv on mutually dependent types

**URL:** <https://discuss.ocaml.org/t/ppx-variants-conv-on-mutually-dependent-types/17176>\
**Category:** Ecosystem\
**Tags:** ppx\
**Created:** [August 28, 2025, 2:21pm UTC](https://discuss.ocaml.org/t/ppx-variants-conv-on-mutually-dependent-types/17176 "2025-08-28T14:21:07Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![smuenzel](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/smuenzel/32/3945_2.png) [@smuenzel](https://discuss.ocaml.org/u/smuenzel)\
**Post date:** [August 28, 2025, 8:36pm UTC](https://discuss.ocaml.org/t/ppx-variants-conv-on-mutually-dependent-types/17176/2 "2025-08-28T20:36:31Z")

</div>

I think it’s probably not too hard to add support recursive definitions in `ppx_variants_conv`, but for now, you can probably work around by unwrapping the recursion:

```ocaml
type 't t'' = | Point of 't | Line of int * int [@@deriving variants]
type t = t' t'' and t' = Pair of t * t

```

---

_[View the full topic](https://discuss.ocaml.org/t/ppx-variants-conv-on-mutually-dependent-types/17176)._
