On Sat, 2013-01-12 at 11:48 +0900, Alex Shinn wrote:Okay, I was holding off until now, but now I think I gotta say that this
> Rather, it's a type of low-level macro that looks at symbol names, and
> how we could potentially do the same thing with high-level macros.
has already been done and has existed in an usable state for a long time
now in Chez Scheme and probably elsewhere that uses the `syntax-case'
system.
In particular, Chez extends 'syntax-rules' to allow for a guard clause
which allows one to unhygienically match against a literal if so
desired.
(define-syntax match-my-plus
(syntax-rules ()
[(_ plus) (eq? '+ (syntax->datum #'plus)) #t]
[(_ else) #f]))
This will give true only in the case where we have (match-my-plus +) and
it will not return true for something like (let () (alias blah +)
(match-my-plus blah)).
I fail to see what the problem is here.
_______________________________________________ Scheme-reports mailing list Scheme-reports@x http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports