[Haskell-cafe] gloss from ghci

18 views
Skip to first unread message

Johannes Waldmann

unread,
Jan 20, 2017, 4:35:28 PM1/20/17
to haskel...@haskell.org
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.

_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.

Sven Panne

unread,
Jan 23, 2017, 9:52:17 AM1/23/17
to Haskell Cafe
2017-01-20 22:34 GMT+01:00 Johannes Waldmann <johannes...@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:


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:


I think this is worth a ticket in the gloss project...

Cheers,
   S.
Reply all
Reply to author
Forward
0 new messages