Always.State_machinetype 'a t = {current : Signal.t; | |
is : 'a -> Signal.t; | |
set_next : 'a -> always; | (*
|
switch : ?default:always Base.list -> 'a cases -> always; |
}val sexp_of_t : ( 'a -> Sexplib0.Sexp.t ) -> 'a t -> Sexplib0.Sexp.tmodule Encoding : sig ... endmodule type State = sig ... endval create :
?encoding:Encoding.t ->
?enable:Signal.t ->
(module State with type t = 'a) ->
Reg_spec.t ->
'a tcreate reg_spec ~e creates a new state machine where the state is stored in a register created from reg_spec and e.