1) I have an open union defined as follows:
type 'a choice = [> `One | `Other ] as 'a
I then try to define a type choice_list:
type choice_list = choice list
which does not work. How does one define types where one or more of the components are open unions?
2) If instead I forgo creating the choice_list
type, and just use a choice list
, when I try writing an interface/signature statement using a choice list,
val choice_handler : choice list -> int
the compiler complains that type 'a choice = 'a constraint 'a = [> `One | `Other ] is not included in type infection_state. They have different arities
.
My question is, how does one write the type declaration of choice list in the interface/signature.