[Hat] Re: hat-trail fails to restore tty state

Malcolm Wallace Malcolm.Wallace at cs.york.ac.uk
Thu Jul 1 16:30:37 EDT 2004


> > > > 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


More information about the Hat mailing list