* tests/base.scm: add two tests for issue #556
The two tests are adapted from issue #556 (originally from r7rs).
The tests currently fail because errors and raised objects are
treated in the same way.
* Use different tags for raised objects and raised errors
The behaviour for raising an error (error message irritants) and
objects (raise object) are different in r7rs. So tag error objects
differently, and adjust the raised object handling to handle
the raised object instead of a list containing the raised object.
This should resolve issue #556.
* runtime: use the correct string length for comparison
Fix for the pull request adressing issue #556.
* runtime: distinguish exceptions and errors in default handler
* repl: use error-object? to decide whether an error or an exception was raised
This makes error messages a bit more informative. Also, if error objects become
a distinct type, then the repl implementation will continue to be correct. The
(deleted) second cond clause seemed to be bit redundant - I am not sure what the
original intent was.
* tests/base.scm: revert accidental deletion of else clause
* Display exceptions as errors for consistency
On Unix-like operating systems stdio.h (which Cyclone seems to use
internally) is line-buffered. As such, the prompt will only be written
after a newline character is written (since the prompt itself doesn't
contain a newline) which is probably not what was
intended here. This commit fixes this issue by always flushing the
current-output-port after writing the prompt string.