Blog Archives

GHC’s performance with threads is impressive

Here’s a simple program I wrote on a whim tonight, to take a very basic look at GHC’s low-level threading performance. module Main where import Control.Applicative import Control.Concurrent.MVar import Control.Concurrent import Data.Time import System.Environment main = do mv <- newEmptyMVar

Posted in haskell

The basics of applicative functors, put to practical work

Applicative functors are gorgeous and versatile creatures, but as is common in Haskell, they lack a little in documentation. The paper that Conor and Ross wrote introducing them is good, but dense. What if we were to skip all the

Posted in haskell

The Monad Squad

Tired of imperative programmers kicking sand in your face? Send some cut-out lambdas and a postal order for 5 frobs to haskell.org, and we’ll send you a handy-dandy poster of those famous superheroes, the Monad Squad! State helps functional programmers

Posted in haskell

Phil Wadler to talk in San Francisco next week

POPL 08 takes place next week, so San Francisco will be flooded with an army of burly and menacing programming language researchers and type theorists. Kids, don’t say you haven’t been warned. On Wednesday evening, January 9, Phil Wadler will

Posted in haskell

LLVM bindings for Haskell

I’ve spent a bit of time over the past few days putting together some LLVM bindings for Haskell, based on Gordon Henriksen’s C bindings. (If you don’t know what LLVM is, it’s a wonderful toybox of compiler components, from a

Posted in haskell, open source

Design your functions for partial application

Every language’s standard library has its weak spots. In C, for example, the stdio functions don’t have a consistent notion of where the FILE * belongs in the argument list. For fwrite, it goes at the end; for fseek, it’s

Posted in haskell

GHC 6.8.1, gtk2hs 0.9.12.1 now available for Fedora 8

If you use Fedora 8, GHC 6.8.1 will be in the stable repository within 24 hours or so. I’ve also pushed a compatible build of gtk2hs 0.9.12.1 to the stable repository.
Posted in haskell

GHC 6.8.1 pushed to Fedora 8 testing

Upgrading my laptop from F-7 to F-8 yesterday was painless, so I’ve been able to verify that the latest version of GHC works smoothly. I’ve pushed the built packages to the F-8 testing repository, and will bump them to release

Posted in haskell, linux

See me speak at Ignite SF tonight

This evening, I’ll be speaking at the peculiar but fun Ignite SF. My talk is notionally about functional programming, but it’s really about imposing constraints on yourself, and what you can get out of it.

Posted in haskell, open source

Using Emacs to insert SCC annotations in Haskell code

When debugging or profiling Haskell code, it’s common practice to pepper it with cost centre annotations, often called SCC (for strongly connected component set cost centre) annotations. If you compile a program using ghc -prof -auto-all, this causes all of

Posted in haskell