
2 Mar
2001
2 Mar
'01
4:52 a.m.
The little program below is to test an idea to try to interact using Hugs or GHCi with a running program.
To use the program: 1. Start the server with "addServer addChan" 2. Write requests to addChan "writeChan addChan (Add 3 4)"
The program seems to work OK in Hugs, but crashes out with "ghc: no threads to run".
Can anybody suggest a way of getting this to run properly with GHCi?
I think you wanted "forkIO (addServer addChan)", because addServer immediately attempts to read from the channel and will block if there's no data available. Oh, and you should really say "{-# NOINLINE addChan #-}" to prevent it being accidentally duplicated. Cheers, Simon
8845
Age (days ago)
8845
Last active (days ago)
0 comments
1 participants
participants (1)
-
Simon Marlow