5
1)我有一个开放的联盟定义如下:开放工会类型定义
type 'a choice = [> `One | `Other ] as 'a
然后我试图定义一个类型choice_list:
type choice_list = choice list
不工作。如何定义一个或多个组件是开放式工会的类型?
2)相反,如果我放弃创建choice_list
类型,并且只使用一个choice list
,当我尝试写的用一个选择列表的接口/签名声明,
val choice_handler : choice list -> int
编译器抱怨type 'a choice = 'a constraint 'a = [> `One | `Other ] is not included in type infection_state. They have different arities
。
我的问题是,如何在接口/签名中写入选择列表的类型声明。