Source

parvel / univ.mli

(* taken from http://ocaml.janestreet.com/?q=node/95 *)

module Variant
 :
  sig
    type t 'a;

    (** [create variant_name to_sexp] creates a new variant with the
        given name *)
    value create : string -> t 'a;
  end
;

type t;

value create : Variant.t 'a -> 'a -> t;

value match_ : Variant.t 'a -> t -> option 'a;

value variant_name : t -> string;