8

Is there any alive Haskell library which implements FRP and could be used to program UI/interactive graphics?

What I expect from such a library:

  • Doesn't use any crazy GHC extension, so code could be understood by mortals.
  • Not abandoned (had some commits in last 6 mouths and few answered thread in mailing lists).
  • Backed by some modern window library (Qt, GTK) and covers fair amount of it functionality.
  • Also has drawing and animation support, i.e. let the user to simply define some shapes and effects and bind their parameters to behaviors.

I checked some resources and picture is quite sad.

  • Original Fran and its ancestor Fruit family are officially dead.
  • Reactive is an abstract framework and doesn't have bindings to real UI/graphics (did I miss something?).
  • Netwire also look aimed for general case. Currently it has no documentation covering how to build UI/graphics with it. The only example is a full application not even close to tutorial.
  • Grapefruit looks good, but it had last commits in December 2013 and the mailing list full of spam. I consider it abandoned.
  • Yampa has not documentation at all, and the mailing list is silent since November 2013.
CheatEx
  • 2,082
  • 2
  • 19
  • 28
  • [There are several backends for reactive.](http://hackage.haskell.org/packages/search?terms=reactive) – user2407038 Jul 09 '14 at 15:06
  • [I think there's just one...](http://packdeps.haskellers.com/reverse/reactive) – J. Abrahamson Jul 09 '14 at 19:12
  • Sodium has a Scala port, so that is an alternative, combine it with JavaFX and you have a powerful FRP system. ELM is Haskell like, has all the things you need. Here is also this: http://weblog.luite.com/wordpress/ – jhegedus Jan 31 '15 at 09:43
  • I see this question still receives some vote-ups. Please vote for reopen if you find it useful. I agree that asking recommendations for a tool generally aren't helpful for others. But here I ask whether a *class* of tools meeting specific criteria exists. And obviously there are more people looking for an answer. – CheatEx Mar 12 '15 at 07:37

2 Answers2

7

Reactive Banana has been updated relatively regularly, has bindings to SDL, some decent examples, a tutorial and a relatively small but decently commented API reference.

There's also a backend to wx, and see this question about using it with GtK.

The maintainer, Heinrich Apfelmus, is on Stack Overflow, and often answers questions on the reactive-banana tag.

Does this suit your needs?

Community
  • 1
  • 1
Benjamin Kovach
  • 3,190
  • 1
  • 24
  • 38
  • 2
    I would like to add that `reactive-banana` is not a GUI library per se, but a general FRP library with bindings to different GUI libraries. I am currently working on a more tightly integrated GUI+FRP library, [threepenny-gui](http://haskell.org/haskellwiki/Threepenny-gui). – Heinrich Apfelmus Jul 10 '14 at 08:39
2

GUI programming is the major use case of reactive-banana I believe.

Tom Ellis
  • 9,224
  • 1
  • 29
  • 54