Reflex-FRP

A full-stack functional reactive programming framework for developing web apps in Haskell. Se https://reflex-frp.org/

The recommended way to get started with writing reflex apps is via Obelisk … or reflex-stone if you do not want a backend server.

Links to this page
  • ka Project

    ka (originally announced in Neuron 1.0 released) was a research playground (and an instance of Hybrid rewrite-refactor model of project develoment) for 📓 Zettelkasten, as well as an independent app, for Neuron. Like Neuron, it is written in Haskell, but built on top of Reflex-FRP. See ka.srid.ca for details.

  • PureScript mini-tutorial using Nix

    My Haskell app Neuron recently received a contribution that added support for the very useful client-side search feature. JavaScript was used to implement it; however after having gotten used to merrily creating Reflex-FRP-based web apps (frontend and backend both in Haskell), writing raw JavaScript had very little appeal to me, which left me with the following options:

  • Obelisk tutorial, Markdown preview with Reflex

    We will not work directly with GHCJS, however, and instead will use the Reflex-FRP library, through the excellent Obelisk full-stack framework.

  • No JavaScript
  • Neuron 1.0 released

    If you enjoy using neuron and/or Cerveau, and would like to show your appreciation, you might be interested in the GitHub sponsor goal that will enable the eventual open-sourcing of Cerveau, a full-stack Reflex-FRP app.

    See this blog post which details using Reflex-FRP as build engine in ghcide.

    To achieve this, I’m working on a new (independent) core for neuron, called ka Project (named after the Egyptian concept) that eventually will supplant rib/shake used currently in neuron. ka uses Functional Reactive Programming to provide a reactive build pipeline* specifically geared towards note-taking, as well as plugin mechanism to customize the behaviour of the application at various stages. In addition to being the new core of neuron, ka Project will be an independent app for use, both in the form of web app and GTK+ app; Neuron sponsors get early access to ka Project source code.

  • Haskell

    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.

  • Elm

    I recommend PureScript or GHCJS (Reflex-FRP) – see No JavaScript – over Elm due to the later’s controversial design decisions and aggressive leadership.

  • Cerveau, a future-proof web app for notes

    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.

  • Announcing Ema - Static Sites in Haskell

    I explored the idea of hot-reload’ing the notebook view instantly on Markdown file change in ka Project. You can see a video demo of it here. Likewise, the emanote.obelisk Project – another brief exploration – also supported hot reload. But both these projects were not static sites, and they were built on Reflex-FRP and Obelisk. I also recently got to play with SvelteKit for creating static sites, and its hot reload feature in particular impressed me; however I’m no fan of using a less safe language (see No JavaScript), so I wanted to take the best aspects of these projects and prototype something in Haskell.*

  • A brief F# exploration

    I have been writing full-stack web apps in Haskell using functional reactive programming (Reflex-FRP) for 3 years now. Curiosity stuck me as to find out what the FP languages other than Haskell had to offer in this area.