On Tuesday, November 10, 2015 at 10:38:35 PM UTC-5, Alex Knauth wrote:
> Ok, I just opened https://github.com/racket/racket/pull/1133, which fixes
> this so that syntax-rules still works.
Awesome!
> > On Nov 10, 2015, at 6:19 PM, Alex Knauth wrote:
> > This works though:
The docs
(http://docs.racket-lang.org/syntax/stxparse-patterns.html#%28def._%28%28lib._syntax%2Fparse..rkt%29._pattern-expander%29%29)
give an example, ~maybe, that doesn't actually work:
> (define-syntax ~maybe
(pattern-expander
(syntax-rules ()
[(~maybe pat ...)
Oh, oops. I hadn't realized that syntax-rules using syntax-protect could cause
problems.
This works though:
(define-syntax ~maybe
(pattern-expander
(lambda (stx)
(syntax-case stx ()
[(~maybe pat ...)
#'(~optional (~seq pat ...))]
I'll open a pull request to fix
Ok, I just opened https://github.com/racket/racket/pull/1133, which fixes this
so that syntax-rules still works.
> On Nov 10, 2015, at 6:19 PM, Alex Knauth wrote:
>
> Oh, oops. I hadn't realized that syntax-rules using syntax-protect could
> cause problems.
>
> This
4 matches
Mail list logo