suggestion: a shorter convenience form Per Bothner (22 Jun 2006 19:42 UTC)
Re: suggestion: a shorter convenience form Jens Axel Søgaard (25 Jun 2006 08:14 UTC)
Re: suggestion: a shorter convenience form Per Bothner (25 Jun 2006 14:27 UTC)
Re: suggestion: a shorter convenience form Jens Axel Søgaard (25 Jun 2006 15:49 UTC)
Re: suggestion: a shorter convenience form Per Bothner (26 Jun 2006 23:56 UTC)
Re: suggestion: a shorter convenience form Jens Axel Søgaard (27 Jun 2006 09:00 UTC)
Re: suggestion: a shorter convenience form Per Bothner (27 Jun 2006 14:55 UTC)

Re: suggestion: a shorter convenience form Per Bothner 27 Jun 2006 14:55 UTC

Jens Axel Søgaard wrote:
> My point was that
>
>     Refering to the original piece of syntax is often neccessary in
>     order to give error messages in terms of user written syntax.
>
> so in that context it is relevant.

I agree.

 >Per Bothner wrote:
>> Note also that if you *do* want syntax-error, it might be better to
>> report error location more specifically that the entire cond.
>
> For misuses like (cond) and (cond 1) it makes sense to report the
> entire macro call.

That is easy, since define-syntax-case allows a fall-back case:

(define-syntax-case cond ()
   ((_ c1 c2 ...) ...)
   (x (syntax-error "cond has invalid clause list" #'x)))

For other errors I'd want the error attached to a specific clause:

   (syntax-case c1 (=>)
     [...]
     [ce (syntax-error "cond has invalid clause" c1)])

Then the error message refers to the specific clause.
--
	--Per Bothner
xxxxxx@bothner.com   http://per.bothner.com/