Game of Life in Haskell

Here's another haskell experiment, it's my implementation of Conway's Game of Life. Implementing cellular automata like the Game of Life is a very fun way for me to get familiar with a programming language, and I hadn't done anything graphical in Haskell before so it taught me quite a bit. The most important thing being that it can be really hard to think in a functional way about something like this. My code is probably horribly inefficient so don't use it as an example of idiomatic haskell.

The program in action

The source code can be found here. It depends on the packages System.Random and Graphics.UI.SDL. The easiest way to obtain these is to use the package manager Cabal, like this:

cabal install Random SDL

After that you can just compile it with GHC and run it:

ghc gol.hs

You can modify the contents of the initial field by changing the definitions in main's where-block. There's an emptyField definition as an example.