
Dear Cafe - I am trying to use gloss https://hackage.haskell.org/package/gloss from ghci. The "display" command will open a window and draw the picture on it just fine. But when I close this window by hitting ESC, ghci prints <interactive>: interrupted and exits, so I'm back at the shell from where I started ghci. This is somewhat annoying - especially since ghci's command line history does not get written, so when I re-start it, I have to re-type (work-around: before "display", close ghci, this will write history, then restart and draw. Ugly.) The gloss FAQ suggests ghci -fno-ghci-sandbox but this does not help (ghci still exits, this time, without printing the message). - J.

2017-01-20 22:34 GMT+01:00 Johannes Waldmann < johannes.waldmann@htwk-leipzig.de>:
I am trying to use gloss https://hackage.haskell.org/package/gloss from ghci. The "display" command will open a indow and draw the picture on it just fine.
But when I close this window by hitting ESC, ghci prints <interactive>: interrupted and exits, so I'm back at the shell from where I started ghci. [...]
This is caused by: https://github.com/benl23x5/gloss/blob/277a89ec539471ad1f82ed1086ae4fdf55b4e... GLUT's actionOnWindowClose *does* work, at least it does nowadays, the line in question is from 2011. I've just tested my HSuperBible7 package under ghci, and you can start/stop/restart the examples from the prompt. The relevant lines: https://github.com/svenpanne/HSuperBible7/blob/7e298a5d3cbfa5f739847a538b875... https://github.com/svenpanne/HSuperBible7/blob/7e298a5d3cbfa5f739847a538b875... I think this is worth a ticket in the gloss project... Cheers, S.
participants (2)
-
Johannes Waldmann
-
Sven Panne