package n_ary
-
n_ary.test
Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
Defines an enumeration type with 3 constructors. We refer to each constructor as a "case". Cases and their respective int
values are numbered consecutively starting at zero.
include Ppx_compare_lib.Comparable.S with type t := t
val compare : t Base__Ppx_compare_lib.compare
include Ppx_enumerate_lib.Enumerable.S with type t := t
val all : t list
include Ppx_compare_lib.Equal.S with type t := t
val equal : t Base__Ppx_compare_lib.equal
val sexp_of_t : t -> Sexplib0.Sexp.t
Constants *
val case0 : t
val case1 : t
val case2 : t
Predicates
val is_case0 : t -> Base.bool
val is_case1 : t -> Base.bool
val is_case2 : t -> Base.bool
Conversions to and from int
*
val to_int : t -> Base.int
val of_int : Base.int -> t Base.option
val of_int_exn : Base.int -> t