Some Haskell code that was sitting around.