Hi everyone!
In our bachelor’s thesis we want to create a visual assistant for creating functions by filling type holes.
This should either be a client-side web application (= SPA) or a Visual Studio Code extension.
We looked into the available libraries for creating web applications and the following seem to be the most fitting libraries that we found:
GHC 9 with JS backend:
This seems to work well though it is quite low-level and there doesn’t seem to be any higher-level libraries for it at the moment.
Is it correct that there doesn’t yet seem to be any production-ready (or at least somewhat production-ready) libraries for using the JS backend of GHC 9? Or are you aware of any?
We would like to know whether anyone from this community can recommend us one of the aforementioned options from personal experience or a different reason?
Or whether you can recommend any other option for creating web applications with Haskell?
Also we would like to know whether you can point us to any examples of VS Code extensions that were built using Haskell or what libraries you would use for something like this?
Does using GHC 9 with miso/reflex only work with the WASM backend and not with the JS backend?
But thanks, this could also be a good possibility that I’ll look into!
Thanks for the suggestion. Hyperbole looks pretty cool, but it runs on the server and we’d want our program to run completely on the client. So it’s not a good fit for our project.
Thanks for the instructions.
But does this then make it possible to use miso/reflex with the GHC 9 JS backend? Are there afterwards any additional steps needed?
In both of the repositories I find no mention of using the framework with GHC 9 and all of the examples suggest setting it up with nix and then seem to use GHC 8.
This works great! Thank you so much
Is it also so easy for reflex-platform or obelisk? I gave it a try but wasn’t yet successful. A hint into the right direction would be greatly appreciated!
I am currently exploring Servant and Elm. I will say more about this combination later. Servant is supposed to interop nicely with Elm, and Elm’s syntax is very similar to Haskell’s.
I would strongly recommend against learning Elm in 2025.
There’s been very little communication from the maintainers for years. Compiler development has been stagnant, and trivial bug reports left unresponded to. And while I may have been unlucky with my particular dependencies, it feels like there’s been a major exodus of library maintainers.
I’ve always seen it as a bit of a toy language anyway, with some weird limitations like not being able to use a custom type as the key to a map. The tooling is also slick but basic.
I’ve been using Miso a lot recently, and it’s better in almost every way.
I used PureScript for a work project a few years ago, which then got ported to React+TypeScript due to frustrations with tooling and library availability. It’s a well-designed language, and Halogen is great, but it suffers the effects of having a very small community. I’d be unlikely to reach for it again now that the age of Haskell+WebAssembly is upon us.
I’ve been wondering that myself. No one’s really given me a compelling reason to prefer the JS backend in the long run. The only advantages I can see are that the packaging is simpler for now (which makes it better supported by Nixpkgs, for example), and that it’s easier to port old GHCJS projects.