Ppx deriving enum

I do not intend to sound entitled / complaining here. Genuine questions:

  1. Is this https://github.com/ocaml-ppx/ppx_deriving/blob/v5.2.1/src_plugins/enum/ppx_deriving_enum.cppo.ml the correct code for ppx deriving enum ? Or is it the output of the macro ? It is quite a bit more verbose than I expected.

  2. Assuming the above is hand written: Is this the expected level of verbosity of writing deriving macros ? I do not want to sound like a complainer here, but this macro would be much much shorter in Clojure / Scheme.

  3. Besides camlp4/camlp5, are there efforts to make this shorter ?

Thanks!

1 Like