ghci crash after exception

Erkok, Levent levent.erkok at intel.com
Mon Jun 28 19:49:09 EDT 2004


Hi,

 

I've a read-eval-print loop based program that I've been trying to make
more robust by catching and responding to any exceptions that might be
thrown; mainly using Control.Exception.evaluate and
Control.Exception.catch. However, I noticed that once I catch a
non-termination type of error and take care of it, ghc throws me a
"thread blocked indefinitely" message and immediately crashes in the
next read-eval-print attempt right away. I was trying to come up with a
small bit of code to demonstrate this when I noticed ghci behaves the
same:

 

c:\>ghci

   ___         ___ _

  / _ \ /\  /\/ __(_)

 / /_\// /_/ / /  | |      GHC Interactive, version 6.2.1, for Haskell
98.

/ /_\\/ __  / /___| |      http://www.haskell.org/ghc/

\____/\/ /_/\____/|_|      Type :? for help.

 

Loading package base ... linking ... done.

Prelude> let x=x in x

*** Exception: <<loop>>

Prelude> 3

 

Fail: thread blocked indefinitely

 

c:\>

 

 

The first message is great. However expression '3' causes ghci to crash
after that. (This is happening on Windows, by the way. I don't have a
*nix lying around to try it out.)

 

So, my questions is: How do we address this issue, if at all possible.
If possible, why doesn't ghci do it?

 

Thanks,

 

-Levent.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/glasgow-haskell-bugs/attachments/20040628/6cd7435f/attachment.htm


More information about the Glasgow-haskell-bugs mailing list