3 ms·
I'm currently playing with Reflex, a wonderful functional reactive programming library that lets you compile the same code into into webapps with GHCJS (a JavaS
by mrkgnao 9y ago
I'm currently playing with Reflex, a wonderful functional reactive programming library that lets you compile the same code into into webapps with GHCJS (a JavaScript backend for GHC) or into standalone desktop apps (using WebKitGTK).
It's wonderfully expressive and doesn't feel like you're painfully imitating C++ in Haskell. On the contrary, it's very idiomatic.
https://github.com/reflex-frp/reflex https://github.com/reflex-frp/reflex
However, FRP is ... unusual, and takes a bit of time to get the hang of.
Here's a stripped-down todo app "tutorial" in Reflex:
https://gist.github.com/mrkgnao/1a5c06cc1e188f2238c8c11cb74efe9a https://gist.github.com/mrkgnao/1a5c06cc1e188f2238c8c11cb74e...
And this is a full-featured TodoMVC in Reflex:
https://github.com/reflex-frp/reflex-todomvc https://github.com/reflex-frp/reflex-todomvc
--
FLTK is a GUI toolkit that has Haskell bindings. It's a very C++-like API, but the library is in heavy development.
https://github.com/deech/fltkhs https://github.com/deech/fltkhs
The developer is also quite friendly, and I believe there are good docs. Here are a few demos:
https://github.com/deech/fltkhs-demos https://github.com/deech/fltkhs-demos
Also, GHC does have a C backend, afaik, although it's deprecated nowadays and only available if you build it yourself in "unregisterised mode", which people do when porting GHC to a new architecture.