
Hello Simon, Thursday, February 1, 2007, 12:46:29 PM, you wrote:
Any other suggestions?
may be, we can raise exception in foreign language? at least for 'safe' calls. i.e., we establish in RTS signal handler. this handler checks whether we are performing safe call and if so - raise language-specific exception... hmm, if that's possible btw, how about using for *Haskell* code *default* signal handler that raise Haskell exception? i think that using signal handlers to process OS-generated events is just legacy from the C days. i.e. 'main' should be called by RTS inside code like this: mainThread <- myThreadId let onBreak event = do throwTo mainThread BreakException bracket (installHandler$ Catch onBreak) (installHandler) $ \oldHandler -> do main (of course, this handles only ^Break and only on Windows) among other things, this should make signal handling portable between Win/Unix -- Best regards, Bulat mailto:Bulat.Ziganshin@gmail.com