Bonsai_private_base.Importmodule Applicative = Applicativeinclude module type of struct include Module_types endmodule Incr = Ui_incrmodule type Enum = Module_types.Enummodule type Component_s = Module_types.Component_sMany modules have the same shape: they declare the model, action, and result of the component, and then define apply_action and compute over those types.
type ('input, 'model, 'action, 'result) component_s =
(module Component_s
with type Action.t = 'action
and type Input.t = 'input
and type Model.t = 'model
and type Result.t = 'result)module type Component_s_incr = Module_types.Component_s_incrThis module type is similar to Component_s, except that many of the functions' arguments and return values are incremental. See Component_s for an explanation of the items in this signature.
type ('input, 'model, 'action, 'result) component_s_incr =
(module Component_s_incr
with type Action.t = 'action
and type Input.t = 'input
and type Model.t = 'model
and type Result.t = 'result)module type Mapn = Module_types.Mapnmodule type Arrn = Module_types.Arrninclude module type of struct include Annotate_incr endmodule Kind = Annotate_incr.Kindval on_incr_annotation :
(here:Core.Source_code_position.t -> Kind.t -> Ui_incr.Packed.t -> unit) ->
uniton_incr_annotation registers a callback that will run whenever Bonsai annotates an incremental node. Annotation happens:
Snapshot.tA single node may be annotated multiple times, e.g. if it is both a model and a result.
val annotate :
here:Core.Source_code_position.t ->
Kind.t ->
'a Ui_incr.t ->
unitannotate will run all on_incr_annotation listeners.
val annotate_packed :
here:Core.Source_code_position.t ->
Kind.t ->
Ui_incr.Packed.t ->
unitmodule Counts = Annotate_incr.Countsval attribute : Core.Source_code_position.t -> 'a Ui_incr.t -> unitval attribute_packed : Core.Source_code_position.t -> Ui_incr.Packed.t -> unitmodule For_profiling = Annotate_incr.For_profilingmodule Effect = Ui_effectmodule Time_source = Ui_time_sourceval unreachable_action : Core.Nothing.t Action.leaf Action.t -> 'aval unusable_apply_action :
inject:'a ->
schedule_event:'b ->
'c ->
'd ->
Core.Nothing.t Action.leaf Action.t ->
'eval unit_model : unit Incr.t