loop :: AppController -> IO ()
loop app = do
  (continue,newApp) <- handleEvents app
  when continue $ do
    -- TODO: here
    F.expose (appModel newApp) (appFView newApp)
    (mx,my,_) <- getMouseState
    when (appGUIVisible app) $ exposeGUI mx my app
    SDL.flip $ appScreen newApp
    loop newApp
loop :: AppController -> IO ()
loop app = do
  (continue,newApp) <- handleEvents app
  when continue $ do
    -- TODO: here
    F.expose (appModel newApp) (appFView newApp)
    (mx,my,_) <- getMouseState
    when (appGUIVisible app) $ exposeGUI mx my app
    SDL.flip $ appScreen newApp
    loop newApp
loop app = do
  (continue,newApp) <- handleEvents app
  when continue $ do
    -- TODO: here
    F.expose (appModel newApp) (appFView newApp)
    (mx,my,_) <- getMouseState
    when (appGUIVisible app) $ exposeGUI mx my app
    SDL.flip $ appScreen newApp
    loop newApp