servant VS reflex

Compare servant vs reflex and see what are their differences.

servant

Main repository for the servant libraries — DSL for describing, serving, querying, mocking, documenting web applications and more! (by haskell-servant)

reflex

Interactive programs without callbacks or side-effects. Functional Reactive Programming (FRP) uses composable events and time-varying values to describe interactive systems as pure functions. Just like other pure functional code, functional reactive code is easier to get right on the first try, maintain, and reuse. (by reflex-frp)
Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
servant reflex
16 17
1,768 1,054
0.4% -0.1%
7.5 4.4
4 days ago 12 days ago
Haskell Haskell
BSD 3-clause "New" or "Revised" License BSD 3-clause "New" or "Revised" License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

servant

Posts with mentions or reviews of servant. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-10-07.
  • An alternative front end for Haskell?
    3 projects | news.ycombinator.com | 7 Oct 2023
    > do you really have to understand language extensions?

    You do when your code doesn't compile and you're trying to figure out what the error message means, or when the library you want to use makes heavy use of it for even basic functionality.

    > These days one just enables GHC2021

    My experience was pre-GHC2021. I basically had to enable at a minimum 5-6 language extensions in every single file.

    > Mostly they're just about removing unnecessary restrictions from the older standard.

    Yeah, those ones are usually fine. I have zero objection to things like FlexibleInstances or DeriveFoldable.

    > Could you give an example?

    I believe I was trying to implement Central Authentication Service using Servant. However, that required returning a custom HTTP status code. There has been an open Github issue for this since 2017, but it seems to require basically rewriting the entire framework: https://github.com/haskell-servant/servant/issues/732

    Looking back at it now Servant does have "ServerError", but that basically requires giving up all the advantages Servant claims to have and I believe it was not a viable option at the time. Looking at the timeline I was probably also on Servant 0.15, and there seems to have been a rewrite since then.

    I vaguely recall running into a similar issue trying to interact with a database, but I can't remember the details of that.

  • Question: Servant with NamedRoutes and Swagger
    1 project | /r/haskell | 25 Nov 2022
    a HasSwagger instance for NamedRoutes was added in May 2022 (in this commit) but there hasn't been a package release since March
  • Monthly Hask Anything (November 2022)
    3 projects | /r/haskell | 1 Nov 2022
    If you don't like this style, the usual alternative is to change mkDualAuthHandler to take two additional arguments, Proxy tag0 and Proxy tag1 (as e.g. lots of Servant functions do, for historical reasons).
  • How introduce `ResourceT` into my stack
    3 projects | /r/haskell | 14 Oct 2022
    Dunno if this is helpful, but I found this github issue about ResourceT and servant https://github.com/haskell-servant/servant/issues/1345
  • Introduction to Doctests in Haskell
    6 projects | /r/haskell | 19 Apr 2022
    And what about the cabal repl --with-compiler=doctest, which was added recently, in doctest v0.20? I recently submitted a PR for Servant to use this in place of GHC environment files, because it seems less finicky to me. Was this a bad idea?
  • Generate Typescript from Servant API
    5 projects | /r/haskell | 15 Mar 2022
    I asked a somewhat relevant question recently. Maybe you'll find this discussion somewhat helpful: https://github.com/haskell-servant/servant/issues/1547; two packages were talked about. One of the folks from Well Typed replied, and said they tried it recently (and worked fine).
  • Named Routes in Servant
    3 projects | /r/haskell | 9 Mar 2022
  • [ANN] Servant 0.19 release
    1 project | /r/haskell | 2 Feb 2022
    You are highly encouraged to test this release out and let us know what you think ! For bug reports, features requests or any kind of feedback, just open a ticket on our issue tracker.
  • [Servant] Best practices to not mixup routes with same signatures.
    1 project | /r/haskell | 5 Aug 2021
    Even slower than :<|> quadratic compile time in number of routes?
  • Help with servant-client
    1 project | /r/haskell | 30 Apr 2021
    Check this out https://github.com/haskell-servant/servant/issues/335#issuecomment-172300487

reflex

Posts with mentions or reviews of reflex. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-12-08.
  • On inheritance and why it's good Rust doesn't have it
    5 projects | /r/rust | 8 Dec 2023
    There's other people around here who would like to know your opinion about these GUI frameworks! I haven't written a GUI in Rust personally, but my favorite GUI framework is not at all OOP: https://reflex-frp.org/
  • Reflex – Web apps in pure Python
    9 projects | news.ycombinator.com | 2 Aug 2023
    Not to be confused with Reflex, allowing web apps in pure Haskell: https://reflex-frp.org/
  • Interactive animations
    11 projects | /r/haskell | 6 May 2023
    FRP solutions sound very attractive. But reflex seems to be stuck on the outdated GHCJS, and I haven't been able to get it to build. The newer JS output in GHC doesn't yet have DOM support. And even if I used one of those, figuring out how to interact with a LaTeX renderer might be tricky.
  • The Quest for the Ultimate GUI Framework
    4 projects | /r/programming | 22 Apr 2023
    I only have experience using Reflex, which I regard as the main contender for FRP UI libraries in the Haskell sphere. It's got a flashy website, but I think the documentation is a bit disorganized -- it took a long time for me to figure out how to get going with the library (you find some pieces of knowledge scattered here and there, if you look hard enough). My plan was to learn it well enough to onboard other people, but I don't think I could convince anyone who hasn't already decided that they're gonna make UIs in Haskell no matter the required effort.
  • Reflex FRP
    1 project | /r/cryptogeum | 23 Jan 2023
  • Simple GHC stack for a novice
    6 projects | /r/haskell | 17 Oct 2022
    Once someone has spent a bunch of time with Haskell and sees the value, they will find Nix if it makes sense. Maybe they'll want to play with https://reflex-frp.org, or they'll discover they want a better way to package 3rd-party dependencies, or they start using NixOS and want to nix all the things, etc. etc. Or, maybe they'll never find a use for it, and that's okay.
  • Building on iPad
    1 project | /r/haskell | 6 Oct 2022
    Reflex natively supports iOS, along with Android, desktop and web. I would recommend it for functional reactive programming in Haskell: https://reflex-frp.org
  • Functional Reactive Programming
    9 projects | news.ycombinator.com | 16 Aug 2022
  • HTML5 Ubuntu App with native component?
    1 project | /r/pinephone | 26 Mar 2022
    It's been awhile since I've tried to get into Ubuntu Touch/Linux mobile development in earnest. I'm currently working on an app using the reflex framework that I hope to eventually target Android, iOS, Desktop, and Linux Mobile.
  • Event driven programming in haskell
    1 project | /r/haskell | 22 Feb 2022
    If you're talking about the current Elm approach, I'm not sure. Otherwise, the paper I linked to notes some of the FRP libraries that existed at the time, some of which are still supported today (like reactive-banana), and otherwise I'd suggest looking at reflex, mentioned in the first post in this thread. I don't think it existed at the time the Elm paper came out.

What are some alternatives?

When comparing servant and reflex you can also consider the following projects:

servant-ts - See the docs and live playground here

sodium - Sodium - Functional Reactive Programming (FRP) Library for multiple languages

graphql - Haskell GraphQL implementation

Elm - Compiler for Elm, a functional language for reliable webapps.

loli

dunai - Classic FRP, Arrowized FRP, Reactive Programming, and Stream Programming, all via Monadic Stream Functions

swagger-petstore - swagger-codegen contains a template-driven engine to generate documentation, API clients and server stubs in different languages by parsing your OpenAPI / Swagger definition.

reflex-dom - Web applications without callbacks or side-effects. Reflex-DOM brings the power of functional reactive programming (FRP) to the web. Build HTML and other Document Object Model (DOM) data with a pure functional interface.

gc-monitoring-wai - a wai application to show `GHC.Stats.GCStats`

purescript - A strongly-typed language that compiles to JavaScript

servant-blaze

rhine - Haskell Functional Reactive Programming framework with type-level clocks