package incr_dom

  1. Overview
  2. Docs

The Model represents essentially the complete state of the GUI, including the ordinary data that the application is displaying, as well as what you might call the "interaction state", things describing where you are in the lifecycle of the GUI, what view is currently up, where focus is, etc.

type t
val cutoff : t -> t -> bool

A function for testing whether the model has changed enough to require refiring the incremental graph.

It's best if the values in the model support a semantically reasonable cutoff function which lets you avoid infinite recomputation loops that can otherwise be triggered by the visibility checks. For this reason, it's typically a good idea to avoid having simple closures stored in the model.

That said, it does work if you put phys_equal in for the cutoff.