Next: Popup Menus
Up: The Program Window
Previous: The Program Window
An operation is (potentially) unsafe if it may be applied to
inappropriate arguments during an evaluation, thus raising an error.
Since unsafe operations are natural starting points for static debugging,
MrSpidey highlights them via font and color changes as follows:
-
Any primitive operation that may be applied to inappropriate
arguments, thus raising a run-time error, is highlighted in red (or
underlined on monochrome screens).
Conversely,
primitive operations that never raise errors are shown in green.
-
Any function that may be applied to an incorrect
number of arguments is highlighted by displaying the lambda
keyword in red (or underlined).
-
Any application expression where the function position may return a
non-function is highlighted by displaying the enclosing parentheses in
red (or underlined).
Figure 2.1 contains examples of these three
different kinds of unsafe operations. The tab key moves the
focus forward to the next unsafe operation, and the shift-tab
key moves the focus backward to the previous unsafe operation. These
keystrokes make it easy to inspect the unsafe operations in a program.
Figure 2.1: Identifying unsafe operations
PLT