
11 Apr
2013
11 Apr
'13
1:03 a.m.
I'm writing a web server app, which I run in ghci: :main localhost 8000 Unfortunately, after Ctrl-C and :reload, running it again: ** Exception: bind: resource busy (Address already in use) This is pretty annoying, because quitting-and-restarting takes a lot of time since I have many dependencies. How do you deal with this? Can you propose some working code that can be wrapped around my main function to make it work? My first idea is running main in a separate process. If you have a working idea, please also post it as an answer on http://stackoverflow.com/questions/15890912/how-do-i-terminate-a-socket-serv... Thanks