Re: QuickCheck vs WinHugs
Ross Paterson <[email protected]> Sun, 13 Nov 2005 15:09:33 +0000
| Newsgroups | gmane.comp.lang.haskell.cvs.hugs |
|---|---|
| Message-ID | <[email protected]> |
On Sat, Nov 12, 2005 at 07:07:09PM +0000, Neil Mitchell wrote: > The progress display in QuickCheck doesn't work in the latest version > of WinHugs. It remains entirely blank until the end, not displaying > the number it is on. > > Having looked at the source code to quickcheck, it is interacting with > the WinHugs notion of "\b" very badly. In WinHugs \b is treated as > phycially delete the last character that was written out on the > console, removing it. QuickCheck seems to expect the behaviour of \b > to be move the cursor to the left by one position, but do not erase > the text that was to the right of the \b character. > > What should the correct behaviour be, while the \b character is > mentioned in the Haskell report, its behaviour is not. I think ANSI specifies \b as moving the carriage to the left and \DEL as erasing the character from the paper tape. Under Unix the default behaviour is: - if the user types BackSpace, the character to the left of the cursor is erased and the cursor moves left (unless there are no pending user-typed characters). - if the program outputs '\b' to the console, the cursor is moved one position to the left, with no erasure. Is that feasible?