Gadt2
Gadt1
, . :
type never
type _ t1 = A1 : never t1 | B1 : bool t1
type _ t2 = A2 : string t2 | B2 : bool t2
val get1 : bool t1 -> bool
val get2 : bool t2 -> bool
, type never
- , , RHS. , , gadt1.ml, type never = bool
, A1
get1
, get1
.
, string
: , bool
, A2
get2
.
, , , never
, , , , . , OCaml; , , , manual. " " .