[Haskell-cafe] How to debug GHC

Glynn Clements glynn at gclements.plus.com
Mon Sep 19 09:22:10 EDT 2005


Frederik Eaton wrote:

> In addition to the stack trace problems, I found: (1) a problem where
> output freezes when it is being piped through 'tee' and the user
> presses ^S and then ^Q

That's the terminal driver; use "stty -ixon" to disable that.

If your program requires "raw" keyboard input, you should explicitly
disable canonical mode on the terminal using setTerminalAttributes.
However, note that this will also disable ^C, ^Z etc.

The GHC runtime *might* do this implicitly if you make stdin
unbuffered (I know it messes around with the terminal state if you
change the buffering for a handle which is associated with a terminal,
but I don't remember the specifics).

-- 
Glynn Clements <glynn at gclements.plus.com>


More information about the Haskell-Cafe mailing list