You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to use gloss with ghci (either stack repl or cabal repl. The gloss window opens nicely but when I close it, it also closes ghci. In an old but report I saw that the gloss window can be closed with ESC which returns control then to ghci. When I try this I get:
<interactive>: interrupted
<interactive>: warning: too many hs_exit()s
and ghci is closed.
I saw some discussion about running gloss with some flags (??), but could not find a comprehesible and likely up-to-date instruction. What is the correct procedure to run gloss graphics in ghci and how to interact with the windows (especially how to close them without closing ghci ?
Thank you!
I work with ghc 8.10.7 and gloss 1.13.2.1 (lts-18.28
The text was updated successfully, but these errors were encountered:
I see this issue is old, but I thought I might as well provide some pointers in case someone else comes by with the same problem;
Regarding flags I assume you mean compiling gloss to use the GLFW backend. If you're using cabal, you can add a file named cabal.project to the root folder of your project, with the following contents:
packages: .
constraints: gloss +GLFW -GLUT
This fixes the ghci problems for me, but on Windows (using freeGLUT) it causes gloss to crash when trying to render text.
I made a fork that works for me with freeGLUT on Windows (though it most likely doesn't work with old GLUT). To use it, I use the following cabal.project config:
I want to use
gloss
withghci
(eitherstack repl
orcabal repl
. Thegloss
window opens nicely but when I close it, it also closesghci
. In an old but report I saw that thegloss
window can be closed with ESC which returns control then toghci
. When I try this I get:and
ghci
is closed.I saw some discussion about running
gloss
with some flags (??), but could not find a comprehesible and likely up-to-date instruction. What is the correct procedure to rungloss
graphics inghci
and how to interact with the windows (especially how to close them without closingghci
?Thank you!
I work with ghc 8.10.7 and gloss 1.13.2.1 (lts-18.28
The text was updated successfully, but these errors were encountered: