Binding existentials in a non-uniform GADT

This will be supported in 5.3 (if there are no complications). The reason why the feature has only been introduced in 5.3 is that the type variables 'a and 'b are not existentially quantified in

type _ foo = Foo : 'a * 'b -> ('a * 'b) foo

since they appear in the type of the variant. The recent PR is 5.3 acknowledge that it is nice to name all type variables introduced by matching other a GADT constructor and extend the support for

function (Foo (type a b) (x, y : a * b)) -> (x, y)

to all type variables introduced by the GADT equation.

1 Like