withWindow :: String -> (CInt, CInt) -> (SDL.Window -> IO ()) -> IO ()
withWindow title size op = do
    window <- createWindow title size >>= either throwSDLError return
    op window
    SDL.destroyWindow window
withWindow :: String -> (CInt, CInt) -> (SDL.Window -> IO ()) -> IO ()
withWindow title size op = do
    window <- createWindow title size >>= either throwSDLError return
    op window
    SDL.destroyWindow window
withWindow title size op = do
    window <- createWindow title size >>= either throwSDLError return
    op window
    SDL.destroyWindow window