Module Gist.Variant_like

Variant likes for gist processors.

A couple of standard variant types are distinguished to allow gist processors to process them specially. If you are uninterested in the specialization use Variant_like.to_variant to treat them uniformly.

type 'v t =
  1. | Option : 'a gist -> 'a option t
  2. | Either : 'a gist * 'b gist -> ('a, 'b) Stdlib.Either.t t
  3. | Result : 'a gist * 'b gist -> ('a, 'b) Stdlib.result t
  4. | List : 'a gist -> 'a list t
  5. | Variant : 'v Variant.t -> 'v t

The type for representing variant like types of type 'v

val to_variant : 'v t -> 'v Variant.t

to_variant vl is the variant like vl as a variant type.