|
|
|
|
|
by octachron
689 days 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
|
|