Re: Testing the reference implementation
Bradley Lucier 20 Nov 2005 23:50 UTC
On Nov 20, 2005, at 4:36 PM, Michael Sperber wrote:
> The reason is that you're assuming a semantics for
> WITH-EXCEPTION-HANDLER which the SRFI 34 version of it doesn't have:
> It doesn't throw back to the call of WITH-EXCEPTION-HANDLER when an
> exception occurs. Consequently, you get ("ERROR") objects thrown deep
> into the innards of the reference implementation, and that makes it
> gag, and, subsequently, less than articulate.
>
> You probably want something like:
>
> (let ((result
> (guard
> (exc
> (else error-object))
> (operation first-arg second-arg))))
> ...)
>
> in its place.
Thanks, I changed the code to
(let ((result (call-with-current-continuation
(lambda (c)
(with-exception-handler
(lambda (args) (c error-object))
(lambda ()
(operation first-arg second-arg)))))))
(print-result name first-arg second-arg result))
and it got rid of that problem.
> Having said that, your test program spotted a few more typos after
> this change---thanks for that! I've put an updated reference
> implementation up at the SRFI site which fixes at least the most
> obvious ones.
Is this a semi-official announcement of a new implementation at the
srfi web site?
Brad