What is wrong with the following code?
type 'a t = A type 'a s = int t = A
Error: This variant or record definition does not match that of type int t
Their constraints differ.
According to the OCaml manual
Re-exported variant type or record type: an equation, a representation.
In this case, the type constructor is defined as an abbreviation for the type expression given in the equation, but in addition the constructors or fields given in the representation remain attached to the defined type constructor. The type expression in the equation part must agree with the representation: it must be of the same kind (record or variant) and have exactly the same constructors or fields, in the same order, with the same arguments.
I thought the above code could type check?