
1 Jul
2004
1 Jul
'04
4:30 p.m.
Also, hat-trail failed to properly restore the tty state after ":q".
OK, now I understand what ghc-6 is doing, an easy fix is apparent. It all depends on the order of calling 'stty' and hSetBuffering. This is the wrong order (as in HatTrail.hs):
do system ("stty -icanon -echo") hSetBuffering stdin NoBuffering hSetBuffering stdout NoBuffering
and this is a working order:
do hSetBuffering stdin NoBuffering hSetBuffering stdout NoBuffering system ("stty -icanon -echo")
Regards, Malcolm