SDL2 tutorial code in Haskell