#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`). -- Ticket URL: http://hackage.haskell.org/trac/hugs/ticket/78#comment:1 Hugs http://www.haskell.org/hugs/ Hugs 98, an interpreter for Haskell
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@haskell.org http://www.haskell.org/mailman/listinfo/hugs-bugs
On Wed, Oct 17, 2007 at 04:50:21PM +0100, Richard Bird wrote:
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`).
Of course, I tried that before sending a bug, but it doesn't work.
OK, there's a bug in setBuffering on terminals, now fixed in the development version. (untested on Windows, though.)
participants (3)
-
Hugs -
Richard Bird -
Ross Paterson