This simple application demonstrates three types of UIs modelled with three different comonads, namely:
Storecomonad: models a general architecture where every component fully exposes its state for read and write operations;
Moore icomonad: isomorphic to
Cofree ((->) i)or
Traced [i], this comonad models the Elm architecture where user component inputs are given by a type
Cofree fcomonad: models an object-oriented architecture similar to that of Halogen.
We have implemented local storage in the browser for saving tasks for all UI examples. In the
Moore example, however, it is still unclear what could be the best method for applying effects when of a component action (as the component state is private). We have used an ad hoc approach by replicating a
save function when of every user action.
After installing the prerequisites, simply run