https://en.wikipedia.org/wiki/Elm_(programming_language)
I recommend PureScript or GHCJS (Reflex-FRP) over Elm due to the later’s controversial design decisions and aggressive leadership.
https://en.wikipedia.org/wiki/Elm_(programming_language)
I recommend PureScript or GHCJS (Reflex-FRP) over Elm due to the later’s controversial design decisions and aggressive leadership.
The leadership style in Elm is extremely aggressive and authoritarian.
This gives us a project layout with three Haskell packages: backend
, common
and frontend
. As the names indicate, frontend
contains the Haskell code that ultimate gets compiled to JavaScript. The common
package however contains code that is shared between the backend and the frontend. This is extremely useful for type sharing, which is impossible with something like Elm or PureScript (without explicit conversion).
My first foray into Haskell was to write fullstack web applications using Reflex-FRP, after having used Elm prior to that. Nowadays I consider it my go-to language for general application development.
Cerveau’s frontend too is written in Haskell. Wait, how is that possible? The GHCJS compiler compiles Haskell code to low-level JavaScript for running in the browser. Cerveau uses the Reflex-FRP library, via the excellent Obelisk framework, which takes care of all the plumbing required to produce such full-stack Haskell apps, so that I as a developer can focus on the FRP application logic. FRP, and similar models of UI programming, is simpler to write and extend than callback based code. Anybody who writes Elm* can attest to that; however unlike Elm or PureScript, GHCJS code can be shared with the backend. This is what enables Cerveau to directly reuse much of the Neuron source code, thus enabling neuron’s core features to work directly on the browser–for example, live HTML preview while editing the note.