sig
module Toggle :
sig
type ('a, 'b) t =
('a, 'b) Error_check.Toggle.t = {
assertion : 'a -> bool;
fail_alert : 'a -> 'b;
success_alert : 'a -> 'b;
mutable success_last : bool;
}
val create :
assertion:('a -> bool) ->
fail_alert:('a -> 'b) -> success_alert:('a -> 'b) -> ('a, 'b) t
val check : ('a, 'b) t -> 'a -> 'b option
val state : ('a, 'b) t -> bool
val sexp_of_t : 'a -> 'b -> ('c, 'd) t -> Sexplib.Sexp.t
end
module ToggleN :
sig
type ('a, 'b) t =
('a, 'b) Error_check.ToggleN.t = {
assertion : 'a -> bool;
fail_alert : 'a -> 'b;
final_fail_alert : 'a -> 'b;
success_alert : 'a -> 'b;
max_fail_alerts : int;
mutable num_fail_alerts : int;
}
val create :
assertion:('a -> bool) ->
fail_alert:('a -> 'b) ->
final_fail_alert:('a -> 'b) ->
success_alert:('a -> 'b) -> max_fail_alerts:int -> ('a, 'b) t
val check : ('a, 'b) t -> 'a -> 'b option
val state : ('a, 'b) t -> bool
val sexp_of_t : 'a -> 'b -> ('c, 'd) t -> Sexplib.Sexp.t
end
module Timer :
sig
type ('a, 'b) t =
('a, 'b) Error_check.Timer.t = {
assertion : 'a -> bool;
fail_alert : 'a -> 'b;
success_alert : 'a -> 'b;
min_alert_interval : Time.Span.t;
mutable last_fail_alert_time : Time.t option;
}
val create :
assertion:('a -> bool) ->
fail_alert:('a -> 'b) ->
success_alert:('a -> 'b) ->
min_alert_interval:Time.Span.t -> ('a, 'b) t
val check : ('a, 'b) t -> 'a -> Time.t -> 'b option
val state : ('a, 'b) t -> bool
val sexp_of_t : 'a -> 'b -> ('c, 'd) t -> Sexplib.Sexp.t
end
module Step :
sig
type ('a, 'b, 'c) t =
('a, 'b, 'c) Error_check.Step.t = {
initial_threshold : 'a;
mutable threshold : 'a;
loosen : 'b -> threshold:'a -> 'a;
assertion : 'b -> threshold:'a -> bool;
fail_alert : 'b -> 'c;
success_alert : 'b -> 'c;
}
val create :
threshold:'a ->
loosen:('b -> threshold:'a -> 'a) ->
assertion:('b -> threshold:'a -> bool) ->
fail_alert:('b -> 'c) -> success_alert:('b -> 'c) -> ('a, 'b, 'c) t
val check : ('a, 'b, 'c) t -> 'b -> 'c option
val state : ('a, 'b, 'c) t -> bool
val sexp_of_t : 'a -> 'b -> 'c -> ('d, 'e, 'f) t -> Sexplib.Sexp.t
end
end