Re: [racket-users] Correct use of pattern-expander (example in docs is broken)

2015-11-11 Thread Thomas Dickerson
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: > > (define-syntax ~m

Re: [racket-users] Correct use of pattern-expander (example in docs is broken)

2015-11-10 Thread Alex Knauth
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 works though: > (define-

Re: [racket-users] Correct use of pattern-expander (example in docs is broken)

2015-11-10 Thread Alex Knauth
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 that.