This is just a test so I'm not much concerned, but I have these definitions:
type z
type _ s
type (_, _, _) balance =
| Less : (*∀'a.*) ('a, 'a s, 'a s) balance
| Same : (*∀'b.*) ('b, 'b, 'b) balance
| More : (*∀'a.*) ('a s, 'a, 'a s) balance
type _ aVL =
| Leaf : z aVL
| Node : (*∀'a, 'b, 'c.*)('a, 'b, 'c) balance * 'a aVL * int * 'b aVL ->
('c s) aVL
and I get the error for "type _ aVL =":
Error: In this definition, a type variable cannot be deduced
from the type parameters.
What to do?
H/T to Gabriel Scherer for answering at caml-list.
Shame on me for not googling for the problem. Here the exact problem is addressed: GADTs : a type variable cannot be deduced