
Hi, 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. Thanks Neil

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?

- 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). When the user is typing, the windows rich text control is in charge - so this happens automatically.
- if the program outputs '\b' to the console, the cursor is moved one position to the left, with no erasure.
Is that feasible? I guess so, I'll give it a shot now.
participants (2)
-
Neil Mitchell
-
Ross Paterson