Monthly Archives: February 2009

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 as a partner
  5. Happstack 0.1 Released (one day early!) 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.