Module Bonsai_private_base.Import

module Applicative = Applicative
include module type of struct include Module_types end
module Incr = Ui_incr
module type Enum = Module_types.Enum
module type Component_s = Module_types.Component_s

Many 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_incr

This 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.Mapn
module type Arrn = Module_types.Arrn
include module type of struct include Annotate_incr end
val enable : unit -> unit
val disable : unit -> unit
module Kind = Annotate_incr.Kind
val on_incr_annotation : (here:Core.Source_code_position.t -> Kind.t -> Ui_incr.Packed.t -> unit) -> unit

on_incr_annotation registers a callback that will run whenever Bonsai annotates an incremental node. Annotation happens:

  • On node creation
  • When a node is registered as an input or result to a Snapshot.t

A 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 -> unit

annotate will run all on_incr_annotation listeners.

val annotate_packed : here:Core.Source_code_position.t -> Kind.t -> Ui_incr.Packed.t -> unit
module Counts = Annotate_incr.Counts
val attribute : Core.Source_code_position.t -> 'a Ui_incr.t -> unit
val attribute_packed : Core.Source_code_position.t -> Ui_incr.Packed.t -> unit
module For_profiling = Annotate_incr.For_profiling
module Effect = Ui_effect
module Time_source = Ui_time_source
val unreachable_action : Core.Nothing.t Action.leaf Action.t -> 'a
val unusable_apply_action : inject:'a -> schedule_event:'b -> 'c -> 'd -> Core.Nothing.t Action.leaf Action.t -> 'e
val reset_unit_model : inject:'a -> schedule_event:'b -> unit -> unit
val unit_model : unit Incr.t
val ignore_effect : Base.unit Effect.t Incr.t
val (>>>) : ('a -> 'b) -> ('b -> 'c) -> 'a -> 'c