Skip to content

ghci messes up xterm's tty settings

$ uname -a
SunOS syrma.ccs.neu.edu 5.9 Generic_112233-07 sun4u
sparc SUNW,Sun-Blade-100
$ echo $TERM
xterm
$ stty -a
speed 9600 baud; 
rows = 76; columns = 80; ypixels = 992; xpixels = 499;
csdata ?
eucw 1:0:0:0, scrw 1:0:0:0
intr = ^c; quit = ^\; erase = ^?; kill = ^u;
eof = ^d; eol = <undef>; eol2 = <undef>; swtch = <undef>;
start = ^q; stop = ^s; susp = ^z; dsusp = ^y;
rprnt = ^r; flush = ^o; werase = ^w; lnext = ^v;
parenb -parodd cs8 -cstopb hupcl cread -clocal -loblk
-crtscts -crtsxoff -parext 
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr
-igncr icrnl -iuclc 
ixon -ixany -ixoff -imaxbel 
isig icanon -xcase echo echoe echok -echonl -noflsh 
-tostop echoctl -echoprt echoke -defecho -flusho
-pendin iexten 
opost -olcuc onlcr -ocrnl -onocr -onlret -ofill -ofdel 
$ ghci   
   ___         ___ _
  / _ \ /\  /\/ __(_)
 / /_\// /_/ / /  | |      GHC Interactive, version
6.0.1, for Haskell 98.
/ /_\\/ __  / /___| |      http://www.haskell.org/ghc/
\____/\/ /_/\____/|_|      Type :? for help.

Loading package base ... linking ... done.
Prelude> :quit
Leaving GHCi.
$ stty -a
speed 9600 baud; 
rows = 76; columns = 80; ypixels = 992; xpixels = 499;
csdata ?
eucw 1:0:0:0, scrw 1:0:0:0
min = 1; time = 0;
intr = ^c; quit = ^\; erase = ^?; kill = ^u;
eof = ^a; eol = <undef>; eol2 = <undef>; swtch = <undef>;
start = ^q; stop = ^s; susp = ^z; dsusp = ^y;
rprnt = ^r; flush = ^o; werase = ^w; lnext = ^v;
parenb -parodd cs8 -cstopb hupcl cread -clocal -loblk
-crtscts -crtsxoff -parext 
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr
-igncr icrnl -iuclc 
ixon -ixany -ixoff -imaxbel 
isig -icanon -xcase echo echoe echok -echonl -noflsh 
-tostop echoctl -echoprt echoke -defecho -flusho
-pendin iexten 
opost -olcuc onlcr -ocrnl -onocr -onlret -ofill -ofdel 
$ 

Note how using ghci changes the tty's value for eof and
icanon...  Changing eof in particular is annoying since
suddenly the time-honored ^d keyboard shortcut stops
working for any subsequent program I try to use in
that xterm unless I manually reset the tty's eof setting.

Philippe (meunier@ccs.neu.edu)

Trac metadata
Trac field Value
Version None
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution ResolvedDuplicate
Component None
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information