Hi !
I wonder if there is a ppx [@@deriving list]
that provides the list of argument-less variants from a type declaration. I know I can write an ocaml function using [@@deriving enum]
that does this, but it would be even more straightforward to me if it already exists. Does one know about it ?
Thanks and have a good evening !
JaneStreet’s has got you covered: https://github.com/janestreet/ppx_enumerate/
3 Likes
Thanks a lot @smolkaj, it is even better than I wanted !