$ ocaml -stdin <<EOF
type x=T
type a=x=T
type y=x
type b=y=T
EOF
File "(stdin)", line 4, characters 0-10:
4 | type b=y=T
^^^^^^^^^^
Error: This variant or record definition does not match that of type y
Their kinds differ.
I guess there is a reason why compiler wouldn't follow the type abbreviation but error message is confusing for the beginners, i think it can be improved by explaining a little more (what is that "kind") - e.g. "Their kinds differ - this type b is a re-exported variant (equation and representation) while type y is an abbreviation (equation without representation)."
I guess there is a reason why compiler wouldn't follow the type abbreviation but error message is confusing for the beginners, i think it can be improved by explaining a little more (what is that "kind") - e.g. "Their kinds differ - this type
bis a re-exported variant (equation and representation) while typeyis an abbreviation (equation without representation)."