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

From: Michael Sperber <sperber>
Date: Tue Oct 31 11:50:22 2006

Robby Findler <robby_at_cs.uchicago.edu> writes:

> At Tue, 31 Oct 2006 16:41:31 +0100, 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)?
>>
> Hm ... I think I wasn't clear. The question I'm asking: is it specified
> that the above must produce a particular result, or are there two
> possible outcomes for the program above? (I'm just trying to understand
> what the spec says.)

It almost says that it produces a particular result at run time. I
suspect whoever wrote this originally wanted to write:

(call-with-current-continuation
  (lambda (exit)
    (with-exception-handler (lambda (x) (exit 1) (lambda () (cons 1 2 3))))))

which returns 1.

-- 
Cheers =8-} Mike
Friede, V?lkerverst?ndigung und ?berhaupt blabla
Received on Tue Oct 31 2006 - 11:49:57 UTC

This archive was generated by hypermail 2.3.0 : Wed Oct 23 2024 - 09:15:01 UTC