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):

Arch Haskell News: Feb 07 2009

A regular update of Haskell in Arch Linux

Arch now has 899 Haskell packages in AUR.

That’s an increase of 35 new packages in the last 13 days, or 2.4 new Haskell apps a day. Well done everyone! Here’s the 90 day moving average of releases on hackage.haskell.org

The Arch Haskell Team maintains the Haskell toolchain on Arch Linux. You can join us in #arch-haskell on freenode.org, or on the mailing list.

happstack: a refreshingly innovative web application server

Happstack is a refreshingly innovative web application server written in Haskell. Leveraging the MACID state system, Happstack offers robust and scalable data access without the headache of managing a traditional RDBMS such as MySQL.

The first release was this week. You can now get AUR packages for it:

You can follow the emergence of Happstack in these posts,

  1. Look, HAppS may be alive again!
  2. Software Simply: Happstack: An Interview with Matthew Elde
  3. Happstack 0.1 release scheduled for Wednesday
  4. Mathew Elder joins patch-tag.com as a partner
  5. Happstack 0.1 Released (one day early!)

patch-tag.com is already running on it.

LLVM bindings for Haskell

The Haskell bindings to LLVM have been updated in Arch. You can also use the Hackage package, or get it from darcs.

This version of the package appears to add some new safety via type-level library:

This library permits performing computations on the type-level. Type-level functions are implemented using functional dependencies of multi parameter type classes. To date, Booleans and Numerals (Naturals and Positives) are supported. With regard to Numerals, there is support for common arithmetic operations (addition, substraction, multiplication, division, exponientation, logarithm, maximum, comparison, GCD) over natural numbers (using a decimal representation to make compile-time errors friendlier).

Lennart Augustsson informs us that type-level is used in the llvm binding to

  • keep track statically of vector lengths
  • sure that they are a power of 2
  • making sure that zero and sign extension between integer types go from a smaller to a bigger type
  • making sure that bitcast is done between types of the same number of bits

For a rather stunning example of what you can do with the Haskell LLVM embeddings — something you won’t see anywhere else — check out Lennart Augustsson’s embedding of BASIC in Haskell as a DSL, which also generates very competitive native code via LLVM…

SDL bindings for Haskell

Packages for the Haskell bindings to SDL are now available in Arch.:

Simple DirectMedia Layer is a cross-platform multimedia library designed to provide low level access to audio, keyboard, mouse, joystick, 3D hardware via OpenGL, and 2D video framebuffer. It is used by MPEG playback software, emulators, and many popular games, including the award winning Linux port of “Civilization: Call To Power.”

Many parts of the library are available:

The new Haskell game library is built on top, as is the new purely functional user interface library.

hexpat, hexpat-pickle: Haskell bindings to the stream-oriented XML parser

I’ve updated the Arch package for haskell-hexpat, the Haskell bindings to libexpat. You can get the package here.

$ yaourt --aur -S haskell-hexpat

Also now available, a new package: hexpat-pickle: XML picklers based on hexpat, almost source code compatible with HXT.

This package allows Haskell data structures to be pickled to/from the Tree datatype defined in the hexpat package. It is almost source code compatible with the pickling functionality of the HXT package, to allow you to switch easily between the two implementations.

You can get haskell-hexpat-pickle for Arch here.

HDBC 2.0: industrial database bindings for Haskell

I’ve updated the John Goerzon’s HDBC bindings in AUR to HDBC 2.0, including the

  • sqlite
  • postgres
  • odbc

backends. Update with:

yaourt --aur -S haskell-hdbc

and pick your preferred backend.