[r6rs-discuss] Compile-time detection of contract violations
On Tue, 31 Oct 2006, Michael Sperber wrote:
> Robby Findler <robby_at_cs.uchicago.edu> writes:
>
>> Does this mean that, in conforming implementations of r6, this
>> expression:
>>
>> (with-exception-handler (lambda (x) 1) (lambda () (cons 1 2 3)))
>>
>> might produce 1 and might signal an error (at compile time)?
>
> I don't know what "signal an error" means in the context of the
> current draft. However, the wording you quote says that an exception
> with condition type &warning may be raised.
I believe we were referring to the wording on p.56, which seems to allow a
&syntax exception in these cases:
"Most implementations are able to recognize some violations
when parsing, expanding macros, or compiling a definition
or expression whose evaluation has not yet commenced
in the usual sense. Implementations are allowed
to use nonstandard exception handlers at those times, and
are encouraged to raise &syntax exceptions for violations
detected at those times, even if the definition or expression
that contains the violation will never be executed."
Cheers
Andre
Received on Tue Oct 31 2006 - 10:58:41 UTC
This archive was generated by hypermail 2.3.0
: Wed Oct 23 2024 - 09:15:01 UTC