Warn on conflicting names
The choice of names of the visit_*
method could probably warn in case of conflicting names for different types. See
for example this post: https://discuss.ocaml.org/t/visitors-ppx-with-types-from-functor-input-modules/1637
The crux of the issue is that in
type t = Leaf | Node of {left:t; value:Elt.t; right:t}
[@@deriving visitors {variety="iter"}]
both t
and Elt.t
get the method visit_t
which results in the less-than-friendly error message:
Error: This expression has type Elt.t but an expression was expected of type t