> [Indented text is me; unindented text is GHCi] > > Initial experience with the bug: > > *Autoexi> let x e = do putStrLn "hmm..."; return 'c' > *Autoexi> y <- catch (getChar) (x) > > here, I hit ^C several times, hoping to catch that as an exception. > This didn't seem to happen, and GHCi appeared to still be waiting > for a key, so I pressed 'h' > > hInterrupted. > *Autoexi> y > ghc-5.04.1: panic! (the `impossible' happened, GHC version 5.04.1): > rdrNameModule y > > Please report it as a compiler bug to > [EMAIL PROTECTED], > or http://sourceforge.net/projects/ghc/. > > With a fresh GHCi: > > Prelude> let x e = return 'c' > Prelude> y <- catch (getChar) (x) > > GHCi responded immediately to my first ^C, here. > > Interrupted. > Prelude> y > ghc-5.04.1: panic! (the `impossible' happened, GHC version 5.04.1): > rdrNameModule y
There are two issues here: - the 'rdrNameModule' crash has been reported before, and the fix will be in 5.04.2 - the reason that ^C is not responded to immediately appears to be due to a bad interaction with readline. The readline library puts the input descriptor into blocking mode if it finds it in non-blocking mode, whereas GHC's IO library expects it to be in non-blocking mode all the time. We might be able to work around this by placing stdin back into non-blocking mode after each call to readline... I'll look into it. Cheers, Simon > Please report it as a compiler bug to > [EMAIL PROTECTED], > or http://sourceforge.net/projects/ghc/. > > > Prelude> y <- catch (getChar) (x) > > This time I hit ^C several times, but only got a response when I > pressed a key. > > iInterrupted. > Prelude> y > ghc-5.04.1: panic! (the `impossible' happened, GHC version 5.04.1): > rdrNameModule y > > Please report it as a compiler bug to > [EMAIL PROTECTED], > or http://sourceforge.net/projects/ghc/. > > > _________________________________________________________________ > MSN Photos is the easiest way to share and print your photos: > http://photos.msn.com/support/worldwide.aspx > > _______________________________________________ > Glasgow-haskell-bugs mailing list > [EMAIL PROTECTED] > http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs > _______________________________________________ Glasgow-haskell-bugs mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs