id,summary,reporter,owner,description,type,status,priority,milestone,component,version,resolution,keywords,cc,os,architecture,failure,difficulty,testcase,blockedby,blocking,related
2228,runghc screws up terminal buffering mode and doesn't reset it,guest,igloo,"If I use runghc to run a Haskell script that reads from stdin, my terminal gets put into a strange buffering mode.  This makes the script essentially unusable: characters are echoed twice, and Backspace and EOF don't work.  The state is not even reset afterwards, so future non-Haskell programs act strangely as well.

{{{
$ cat cat.hs
main = putStr =<< getContents
$ stty
speed 38400 baud; line = 0;
eol = M-^?; eol2 = M-^?; swtch = M-^?;
iutf8
$ runghc cat.hs
hheelllloo

^D^?^D^D^C
cat.hs: exception :: GhcException

$ stty
speed 38400 baud; line = 0;
eol = M-^?; eol2 = M-^?; swtch = M-^?; min = 1; time = 0;
iutf8
-icanon
}}}

There is no problem if the script is compiled with ghc instead of interpreted with runghc.

I'm using ghc 6.8.2-2ubuntu1 on hardy amd64.",merge,closed,normal,6.8.3,GHCi,6.8.2,fixed,,,Linux,Unknown/Multiple,,Unknown,,,,
