I think putting "syntax-case:" at the front of the error message is the right thing (and that's a predictable thought, as I'm sure Matthew is thinking right now since it means that macros that use syntax-case to do their error checking will now have to do a better job). Maybe the presence of Ryan's syntax parse library means we can go with this nowadays, tho?
Robby On Mon, Mar 29, 2010 at 2:06 PM, Jon Rafkind <rafk...@cs.utah.edu> wrote: > 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. > > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-dev > > _________________________________________________ For list-related administrative tasks: http://list.cs.brown.edu/mailman/listinfo/plt-dev