https://github.com/arthurxavierx/purescript-comonad-ui-todos
Simple task management application for my bachelor thesis based on Phil Freeman's Comonads as spaces
https://github.com/arthurxavierx/purescript-comonad-ui-todos
comonads purescript ui
Last synced: 7 months ago
JSON representation
Simple task management application for my bachelor thesis based on Phil Freeman's Comonads as spaces
- Host: GitHub
- URL: https://github.com/arthurxavierx/purescript-comonad-ui-todos
- Owner: arthurxavierx
- License: other
- Created: 2017-11-18T14:16:13.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2020-08-16T10:05:10.000Z (about 5 years ago)
- Last Synced: 2025-01-21T19:51:13.800Z (9 months ago)
- Topics: comonads, purescript, ui
- Language: PureScript
- Homepage:
- Size: 894 KB
- Stars: 53
- Watchers: 3
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# purescript-comonad-ui-todos
Simple task management application inspired by [TodoMVC](todomvc.com); written for the first part of my bachelor thesis [Comonads for User Interfaces](https://arthurxavierx.github.com/ComonadsForUIs.pdf) based on Phil Freeman's [Comonads as spaces](http://blog.functorial.com/posts/2016-08-07-Comonads-As-Spaces.html).
This simple application demonstrates three types of UIs modelled with three different comonads, namely:
- the `Store` comonad: models a general architecture where every component fully exposes its state for read and write operations;
- the `Moore i` comonad: isomorphic to `Cofree ((->) i)` or `Traced [i]`, this comonad models the Elm architecture where user component inputs are given by a type `i`;
- the `Cofree f` comonad: models an object-oriented architecture similar to that of [Halogen](https://github.com/slamdata/purescript-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.
## Build instructions
In order to build this application one must have the [PureScript](http://www.purescript.org/) compiler (version 0.11.7) installed, as well as the [npm](https://www.npmjs.com/) and [bower](https://bower.io/) tools for package management.
After installing the prerequisites, simply run
```
make
```