[Hugs] #78: getCh
Richard Bird
bird at comlab.ox.ac.uk
Wed Oct 17 11:50:21 EDT 2007
Of course, I tried that before sending a bug,
but it doesn't work.
For example,
> getCh = do {hSetBuffering stdin NoBuffering;
> hSetEcho stdin False;
> x <- getChar;
> hSetEcho stdin True;
> return x}
> getMyLine = do {x <- getCh;
> if x=='\n' then
> do {putChar x; return ""}
> else
> do {if x=='b' then
> putStr "\b \b"
> else putChar x;
> xs <- getMyLine;
> return (x:xs)} }
doesn't work in the expected way.
Hugs wrote:
> #78: getCh
> ----------------------+-----------------------------------------------------
> Reporter: guest | Owner: nobody
> Type: defect | Status: closed
> Priority: minor | Milestone:
> Component: hugs | Version: 200609
> Resolution: wontfix | Keywords:
> ----------------------+-----------------------------------------------------
> Changes (by ross):
>
> * status: new => closed
> * resolution: => wontfix
>
> Comment:
>
> It was a Hugs-only function, and now it's gone. You should be able to get
> the same effect with `hSetBuffering` and `hSetEcho` (from `System.IO`).
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Hugs-Bugs mailing list
> Hugs-Bugs at haskell.org
> http://www.haskell.org/mailman/listinfo/hugs-bugs
More information about the Hugs-Bugs
mailing list