[Haskell-cafe] gloss from ghci

Sven Panne svenpanne at gmail.com
Mon Jan 23 14:50:54 UTC 2017


2017-01-20 22:34 GMT+01:00 Johannes Waldmann <
johannes.waldmann at 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/277a89ec539471ad1f82ed1086ae4fdf55b4e81b/gloss/Graphics/Gloss/Internals/Interface/Backend/GLUT.hs#L51

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/7e298a5d3cbfa5f739847a538b875aac7a634ee1/src/SB7/SB7/Application.hs#L124

https://github.com/svenpanne/HSuperBible7/blob/7e298a5d3cbfa5f739847a538b875aac7a634ee1/src/SB7/SB7/Application.hs#L201

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

Cheers,
   S.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20170123/5769f298/attachment.html>


More information about the Haskell-Cafe mailing list