Re: [Scheme-reports] auxiliary syntax Alex Shinn (08 Jan 2013 01:33 UTC)
Re: [Scheme-reports] auxiliary syntax Noah Lavine (11 Jan 2013 02:46 UTC)
Re: [Scheme-reports] auxiliary syntax Alaric Snell-Pym (11 Jan 2013 10:05 UTC)
Re: [Scheme-reports] auxiliary syntax Alex Shinn (11 Jan 2013 13:03 UTC)
Re: [Scheme-reports] auxiliary syntax Eli Barzilay (11 Jan 2013 14:30 UTC)
Re: [Scheme-reports] auxiliary syntax Alex Shinn (11 Jan 2013 14:50 UTC)
Re: [Scheme-reports] auxiliary syntax Eli Barzilay (11 Jan 2013 15:06 UTC)
Re: [Scheme-reports] auxiliary syntax Alex Shinn (12 Jan 2013 02:11 UTC)
Re: [Scheme-reports] auxiliary syntax Eli Barzilay (12 Jan 2013 02:15 UTC)
Re: [Scheme-reports] auxiliary syntax Alex Shinn (12 Jan 2013 02:50 UTC)
Re: [Scheme-reports] auxiliary syntax Aaron W. Hsu (12 Jan 2013 03:38 UTC)
Re: [Scheme-reports] auxiliary syntax Alex Shinn (12 Jan 2013 11:33 UTC)
Re: [Scheme-reports] auxiliary syntax Aaron W. Hsu (15 Jan 2013 19:17 UTC)
Re: [Scheme-reports] auxiliary syntax Eli Barzilay (16 Jan 2013 07:12 UTC)
Re: [Scheme-reports] auxiliary syntax Alex Shinn (16 Jan 2013 08:16 UTC)
Re: [Scheme-reports] auxiliary syntax Eli Barzilay (16 Jan 2013 08:28 UTC)
Re: [Scheme-reports] auxiliary syntax Alex Shinn (16 Jan 2013 14:11 UTC)
Re: [Scheme-reports] auxiliary syntax Eli Barzilay (16 Jan 2013 14:30 UTC)
Re: [Scheme-reports] auxiliary syntax Alex Shinn (16 Jan 2013 14:38 UTC)
Re: [Scheme-reports] auxiliary syntax Alaric Snell-Pym (11 Jan 2013 15:01 UTC)
Re: [Scheme-reports] auxiliary syntax Eli Barzilay (11 Jan 2013 15:16 UTC)
Re: [Scheme-reports] auxiliary syntax John Cowan (11 Jan 2013 15:19 UTC)
Re: [Scheme-reports] auxiliary syntax Alex Shinn (12 Jan 2013 01:53 UTC)

Re: [Scheme-reports] auxiliary syntax Aaron W. Hsu 12 Jan 2013 03:37 UTC

On Sat, 2013-01-12 at 11:48 +0900, Alex Shinn wrote:
> 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.

Okay, I was holding off until now, but now I think I gotta say that this
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.

--
Aaron W. Hsu | arcfide@sacrideo.us | http://www.sacrideo.us
לֵ֤ב חֲכָמִים֙ בְּבֵ֣ית אֵ֔בֶל וְלֵ֥ב כְּסִילִ֖ים בְּבֵ֥ית שִׂמְחָֽה׃

_______________________________________________
Scheme-reports mailing list
Scheme-reports@scheme-reports.org
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports