[r6rs-discuss] Compile-time detection of contract violations

Michael Sperber sperber at informatik.uni-tuebingen.de
Wed Nov 1 04:25:56 EST 2006


Abdulaziz Ghuloum <aghuloum at cs.indiana.edu> writes:

> Calling a procedure with an incorrect number of arguments raises a
> &contract condition.  Implementations, under safe mode, must trap
> such condition and invoke the installed exception handler.  Under
> unsafe mode, implementations can ignore this condition since
> &contract is a subtype of &defect which is a subctype of
> &violation, and as per Section 9.22, "an implementation is allowed
> to ignore any requirements for raising an exception with condition
> type &violation (or any of its subtypes)".  Is this correct?
>
> Also, as far as errors (such as attempting to open a nonexistent
> file) are concerned, implementations cannot ignore these errors
> even under unsafe mode since such errors raise &error which is
> *not* a subtype of &violation.  Is this also correct?

It is my understanding that you're correct on all counts.

-- 
Cheers =8-} Mike
Friede, Völkerverständigung und überhaupt blabla



More information about the r6rs-discuss mailing list