Variant.Case
Variant cases.
type name = Gist.name
The type for case constructor names. These must be unqualified. For example "Left" for Either.Left, or "`Left" for `Left.
"Left"
Either.Left
"`Left"
`Left
type 'v t
The type for representing a variant case of a variant of type 'v.
'v
val make : ?doc:string -> name -> 'v Product.t -> 'v t
make name p is a case with given constructor name and product.
make name p
Invalid_argument
if name is "".
name
""
val name : 'v t -> name
name c is the constructor name of c.
name c
c
val doc : 'v t -> string
doc c is the doc string of c.
doc c
val product : 'v t -> 'v Product.t
product c is the product of c.
product c
val is_inline_record : 'v t -> bool
is_inline_record c is true if and only if c is a variant case with an inline record (checked by determining if the product's last field is named).
is_inline_record c
true
product