Module Always.State_machine
type 'a t={current : Hardcaml.Signal.t;is : 'a -> Hardcaml.Signal.t;set_next : 'a -> always;switch casesdoes a switch on all possible states. The cases must be exhaustive and irredundant. If the cases are non-exhaustive, one can supply~defaultto make them exhaustive.switch : ?default:always Hardcaml__.Import.list -> 'a cases -> always;}
val sexp_of_t : ('a -> Ppx_sexp_conv_lib.Sexp.t) -> 'a t -> Ppx_sexp_conv_lib.Sexp.t
module Encoding : sig ... endmodule type State = sig ... endval create : ?encoding:Encoding.t -> (module State with type t = 'a) -> Hardcaml.Reg_spec.t -> enable:Hardcaml.Signal.t -> 'a tcreate reg_spec ~ecreates a new state machine where the state is stored in a register created fromreg_specande.