| I am using Hugs 1.4, Version 970410, Windows 95. ... The first
| evaluation of 'testa 2' results in two blank lines following the
| 'Program error: ...' line. The second evaluation of 'testa 2'
| results in a single blank line following the 'Program error: ...'
| line. Next, evaluation of 'testb 2' results in a quote mark '"' on
| a line by itself followed by the 'Program error: ...' line.
| ...
|
| testa 1 = putStr "one"
| testa _ = error "argument value of 1 required"
|
| testb 1 = "one"
| testb _ = error "argument value of 1 required"
|
| ...
| Is this how one would expect Hugs to operate?
The difference between the experiments with testa and testb is to
be expected because the two functions have different types and hence
use rather different printing mechanisms. testa 2 runs as a program,
while testb 2 is printed as a string. You can also see the difference
between these two by comparing testa 1 with testb 1.
The difference between the two testa experiments is not to be expected.
In fact, it is the result of a curious little anomaly (aka bug) that
can be fixed with the short patch shown below, and which must have
been lurking in Hugs, and Gofer before it, for several years!
Thanks for spotting this, and for pointing it out!
All the best,
Mark
*** hugs.c Wed Sep 24 17:20:44 1997
--- hugs.c.old Wed Sep 24 17:20:02 1997
***************
*** 1567,1570 ****
--- 1567,1571 ----
Putchar('.');
Putchar('\n');
+ aiming = FALSE;
}
else
***************
*** 1574,1578 ****
Putchar('\b');
}
- aiming = FALSE;
FlushStdout();
}
--- 1575,1578 ----