[HOpenGL] mainloop & return

Andre W B Furtado awfurtado@uol.com.br
Thu, 13 Dec 2001 01:06:18 -0200


Is there any problem if the same function that calls "mainloop" returns a
value? Ex.:

main :: IO ()
main = do
    msg <- startGL
    putStrLn msg

startGL :: IO String
startGL = do
    -- init GLUT
    -- create window
    -- declare callback procedures
    mainloop
    return "ok"