(** [update] is the event loop. The function take a new event, and apply it to the current state. *) let update : (Actions.Event.t, State.t) Application.t = fun (E (t, (module EventHandler))) state -> EventHandler.apply t state