Functional reactive grapefruit

Grapefruit is a new suite of libraries for functional reactive-style GUIs layered on top of GTK (via gtk2hs), announced today. Besides being a modern FRP gui library, it notably uses arrow syntax to describe gui components.

Arrow syntax is a bit of a rarity in Haskell code:

    addA f g = proc x -> do
                    y <- f -< x
                    z <- g -< x
                    returnA -< y + z

Will build the computation:

All the components are packaged here for Arch Linux.

In other funky Haskell gui news, haskell-haha has also been released and packaged for Arch, and lets us do vector graphics in ascii in the terminal…. hell yeah!
Here’s a video of haha at work, and how to get it via cabal (yaourt also works fine):

One response to “Functional reactive grapefruit

Leave a comment