[plt-dev] syntax-case error messages
Attached is a small patch for syntax-case that makes some error messages
slightly more pleasant (at least to me).
Old:
> (syntax-case #'1 ())
bad syntax in: 1
> (syntax-case #'1 () 2)
bad clause in: 2
> (syntax-case #'1 () [2])
bad clause in: (2)
> (syntax-case #'1 () [2 2])
bad syntax in: 1
New:
> (syntax-case #'1 ())
syntax-case was unable to match any patterns in: 1
> (syntax-case #'1 () 2)
expected a list of clauses in: 2
> (syntax-case #'1 () [2])
expected 2 or 3 expressions in a clause in: (2)
> (syntax-case #'1 () [2 2])
syntax-case was unable to match any patterns in: 1
There seems to be some disagreement with adding the name 'syntax-case'
into the error message. I could live without that I guess, but it would
be nice to change 'bad syntax' to something more informative, at least.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: diff
URL: <http://lists.racket-lang.org/dev/archive/attachments/20100329/f4f7b822/attachment.ksh>