Category Archives: Releases

CLasH: Haskell to VHDL compiler in AUR

CLaSH is a tool-chain/language to translate subsets of Haskell to synthesizable VHDL. Haskell modules (example) written in a hardware-oriented subset of Haskell are translated into VHDL by the library. That is, you can design hardware directly in Haskell, and generate hardware designs from GHCi.

The Hackage package is now available in AUR.

Amongst other things, it provides a “:vhdl” extension to the GHCi command line, allowing you to generate hardware designs from the GHCi prompt. For more information about CLaSH, see the examples, sources and documentation project page, and the demo from the Haskell Workshop last year:

Other hardware-related libraries in Haskell in AUR:

  • chalmers-lava2000 library: Hardware description library
  • clash library: CAES Language for Synchronous Hardware (CLaSH)
  • ForSyDe library: ForSyDe’s Haskell-embedded Domain Specific Language.
  • Wired library: Wire-aware hardware description
  • york-lava library: A library for digital circuit description.

Snap: A Really Fast Haskell Web Framework

The new Snap web framework for Haskell is now packaged for Arch Linux.

You can install it automagically with, e.g.:

$ sudo bauerbill
            --trusted-users arch-haskell
            --build-as $USER
            -S haskell-snap-server

And dive into the quick start:

$ cd /tmp
$ mkdir site
$ cd site
$ snap init
$ cabal install
$ site 8000

Then visit http://localhost:8000/ to serve up your new web project.

Stand back! haskell-regex-tdfa reaches 1.0.0

Chris Kuklewicz announced, enthusiastically, the release of haskell-regex-tdfa 1.0. You can now get  the Arch Linux package for it here. Amongst the varied and many regex libs for Haskell regex-tdfa stands as being 100% Haskell (not a binding to a C library), and for its use in the Yi project.

To quote Chris on the 1.0 release:

I am proud of this release.
This is not just a bug fix release.
It is a serious improvement in the asymptotic running time.

The previous versions allowed bad combinations of pattern and searched text length to scale badly in the length of the text. Previously the worst case for text of length N was O(N^3).

The new worst case asymptotic runtime scaled as O(N).
There is never any backtracking.
And the worst case storage space is independent of N.

Good work, Chris, and thanks for all the regex packages.

hipmunk: 2D physics for Haskell

hipmunk is a nice Haskell binding to the 2D physics library, chipmunk. It’s now packaged up for Arch Linux, with demos:

Here’s a demo installing the packages from AUR and running the physics demo:

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

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…

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.