module Univ:sig
..end
module Constr:sig
..end
Constr.t
represents a single constructor in the extensible variant type.
type
t
val constr_name : t -> string
val create : 'a Constr.t -> 'a -> t
val does_match : t -> 'a Constr.t -> bool
does_match t constr
returns true
iff t
was created by create constr v
.val match_ : t -> 'a Constr.t -> 'a option
match_ t constr
returns Some v
if t
was created by create constr v
, and
returns None
otherwise.
match_exn t constr
returns v
if t
was created by create constr v
, and raises
otherwise.
val match_exn : t -> 'a Constr.t -> 'a
val sexp_of_t : t -> Sexplib.Sexp.t
does_match t constr
returns true
iff t
was created by create constr v
.match_ t constr
returns Some v
if t
was created by create constr v
, and
returns None
otherwise.
match_exn t constr
returns v
if t
was created by create constr v
, and raises
otherwise.