loop :: Model -> State -> IO ()
loop model state = do
  event <- pollEvent
  state <- handler event model state
  when (event /= Quit) $ loop model state
loop :: Model -> State -> IO ()
loop model state = do
  event <- pollEvent
  state <- handler event model state
  when (event /= Quit) $ loop model state
loop model state = do
  event <- pollEvent
  state <- handler event model state
  when (event /= Quit) $ loop model state