soegaard / whalesong

Whalesong: Racket to JavaScript compiler
http://hashcollision.org/whalesong
145 stars 14 forks source link

define-syntax-rule ellipsis pattern doesnt match single item #22

Open stchang opened 9 years ago

stchang commented 9 years ago
#lang whalesong
(define-syntax-rule (my-define (f x ...) e) (define (f x ...) e))
(my-define (g x) x)

=> my-define: use does not match pattern: (my-define (f x ...) e) in: (my-define (g x) x)

lexi-lambda commented 9 years ago

This is actually because the ellipsis identifier isn't provided for-syntax by whalesong/base, which it should be. Adding a (require (for-syntax racket/private/ellipses)) makes everything work properly.