main :: IO ()
main = drawInWindow $ \draw -> do
    surfaces <- mapM getSurfaceFrom surfacePaths
    let drawSurfaceForKey = draw . selectSurface surfaces
    _ <- draw (head surfaces)
    repeatUntilTrue $ handleKeyInput pollEvent drawSurfaceForKey
    mapM_ SDL.freeSurface surfaces
main :: IO ()
main = drawInWindow $ \draw -> do
    surfaces <- mapM getSurfaceFrom surfacePaths
    let drawSurfaceForKey = draw . selectSurface surfaces
    _ <- draw (head surfaces)
    repeatUntilTrue $ handleKeyInput pollEvent drawSurfaceForKey
    mapM_ SDL.freeSurface surfaces
main = drawInWindow $ \draw -> do
    surfaces <- mapM getSurfaceFrom surfacePaths
    let drawSurfaceForKey = draw . selectSurface surfaces
    _ <- draw (head surfaces)
    repeatUntilTrue $ handleKeyInput pollEvent drawSurfaceForKey
    mapM_ SDL.freeSurface surfaces