[Haskell-beginners] GHCI in my app...

Sean Charles sean at objitsu.com
Sun Jul 10 18:43:28 CEST 2011


Hi,

I've now got a working OpenGL test-bed and I have also written myself a 
"GLI" as I call it, openGl command Line Interface... a forkIO thread 
that listens on port 3000 and once my program is up, I telnet in and 
issue commands to it so I can fiddle with OpenGL whilst it is running. I 
can change the camera position and angle and issue a few simple commands 
to affect the rendered environment so I can better understand how OpenGL 
works. If it works well and the code isn't to amateurish I will github 
it I guess!

However, it seems to me that I am re-inventing the wheel to some degree: 
I am opening a socket, getting input, parsing it and executing 
commands.... what I would really like to be able to do is to *use* the 
already pretty slick ghci interface instead...

...so, is there a way to create an instance of it and attach it to the 
socket?
f I run my app from within ghci it still works but the event loop steals 
any further input.

So, is it possible. I *did* manage this with SLIME and Emacs some years 
ago albeit the slime funtionality was a little broken but I could 
actually recompile code and have it affect the still running application.

I've also been using Parsec latelt and the "wai-handler-devel" also 
entered my mind as an option but I only want a simple CLI after all!

:)
Thanks for your upcoming suggestions.....

Sean




More information about the Beginners mailing list