This error message was new to me, and I wondered what's going on and why:
# type ('a, 'b) t = [ `A | `T of ('b, 'a) t ];;
Error: In the definition of t, type ('a, 'b) t should be ('b, 'a) t
I can get unhelpful suggestions through foolishness with three type
parameters:
# type ('a, 'b, 'c) t = [
From: Edgar Friendly
> This error message was new to me, and I wondered what's going on and
> why:
>
> # type ('a, 'b) t = [ `A | `T of ('b, 'a) t ];;
> Error: In the definition of t, type ('a, 'b) t should be ('b, 'a) t
Structural recursive types (objects and polymorphic variants) must be
regul