Re:Higher-kinded bounded polymorphism in OCaml
by octachron on Monday July 29, 2024 @10:25AM
(#41100726)
The variable "x" would be a list in this case. This the GADT (Generalized Abstract Data Types) syntax, where the type of the whole union can depend on the discriminated union case. Thus
reads: for any value "x" of type "'a list", "List_name x" constructs a value of type "('a, list_name) app". In this case, it is the the "list_name" tag part of the type which is dependent on the union case.
[ Parent
| on HN ]