[R6RS] early arity check

William D Clinger will at ccs.neu.edu
Sun Mar 18 23:37:28 EDT 2007

Kent wrote:
> During our meeting on the 7th, Will mentioned that the exception system
> requires an early arity check.  Is the following from the
> with-exception-handler description the offending text?
>   \domain{\var{Handler} must be a
>   procedure that accepts one argument.}  The {\cf
>   with-exception-handler} procedure returns the result(s) of invoking
>   \var{thunk}.  \var{Handler} is installed as the current
>   exception handler for the dynamic extent (as determined by {\tt
>     dynamic-wind}) of the invocation of \var{thunk}.
>   \implresp The implementation must check the restrictions on
>   \var{handler} to the extent performed by applying it as described,
>   when it is called as a result of a call to {\cf raise} or {\cf
>     raise-continuable}.

That's one of them.  There are several others.  I cited
the ones I have found so far in formal comments 146 and
176, but I doubt whether I have found them all.

> I didn't find any other likely candidates, but it's possible that I'm
> looking in the wrong place.  It's not clear to me, however, that this does
> require an early arity check.

It's clear to me (see tickets 146 and 176), and it was
clear to the people who wrote the formal semantics, but it
isn't entirely clear whether the early arity checks were
actually intended by the project editor.  The current draft
response to ticket 176, written by the project editor,
suggests that the early arity checks really were intended.

As you (and tickets 146 and 176) observe, the requirements
of the 5.92 draft do not stand up to careful scrutiny.  It
might be more efficient to defer consideration of all such
requirements until you see what the 5.93 draft says.  That
would get me out of the loop.


More information about the R6RS mailing list