13 ms·
Ocaml object system can also achieve this in a quite lightweight way type foo = < foo:int > type bar = < bar:int > type k = < foo; bar > type u
by octachron 2y ago
Ocaml object system can also achieve this in a quite lightweight way
type foo = < foo:int >
type bar = < bar:int >
type k = < foo; bar >
type u = < k; baz:int >
let f (x: <u; ..>) (\* the type annotation is not needed \*) = x#m