Module Hardcaml.With_valid

Uses a valid bit to indicate the validity of a value. Conceptually similar to an Option.t.

type 'a t = {
valid : 'a;
value : 'a;
}
val sexp_of_t : ('a -> Ppx_sexp_conv_lib.Sexp.t) -> 'a t -> Ppx_sexp_conv_lib.Sexp.t
val map : 'a t -> f:('a -> 'b) -> 'b t