Module Bonsai_extra_value_stability.Stability

type 'a t =
  1. | Stable of 'a
  2. | Unstable of {
    1. previously_stable : 'a option;
    2. unstable_value : 'a;
    }
include Sexplib0.Sexpable.S1 with type 'a t := 'a t
val t_of_sexp : 'a. (Sexplib0.Sexp.t -> 'a) -> Sexplib0.Sexp.t -> 'a t
val sexp_of_t : 'a. ('a -> Sexplib0.Sexp.t) -> 'a t -> Sexplib0.Sexp.t
include Ppx_compare_lib.Equal.S1 with type 'a t := 'a t
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val most_recent_stable_value : 'a t -> 'a option
val prefer_stable_value : 'a t -> 'a

Return the most_recent_stable_value if there is one, otherwise fall back to the unstable_value.f