logo       

ghci crash after exception: msg#00061

lang.haskell.glasgow.bugs

Subject: ghci crash after exception

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.

_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@xxxxxxxxxxx
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise