[Haskell-cafe] Exiting GLUT application

Dave Tapley dukedave at gmail.com
Tue Jul 31 13:16:40 EDT 2007


Hi everyone, I have the following skeleton GLUT code:

> import Graphics.UI.GLUT
> main = do
>     getArgsAndInitialize
>     createWindow ""
>     mainLoop

It loads into both hugs and ghci fine and when 'main' is evaluated an
empty window opens as expected.
However when closing the window (clicking the window manager's x
button) both hugs and ghci exit with the window, as opposed to
returning to the the 'Main>' prompt.

I suspect I need some callback to exit the GUI cleanly?

Cheers,
Dave


More information about the Haskell-Cafe mailing list