这只是一个测试,所以我不太担心,但我有以下定义:
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
我收到“type _ aVL =”的错误:
Error: In this definition, a type variable cannot be deduced
from the type parameters.
该怎么办?