[plt-scheme] misplaced ellipses

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Tue Feb 26 14:12:54 EST 2008

At Tue, 26 Feb 2008 13:48:45 -0500, David Van Horn wrote:
> (define-syntax f
>    (syntax-rules ()
>      [(f id)
>       (syntax (... id))]))
> 
> (f ...)
> ;; expect (syntax (... ...)),
> ;; ie., the identifier `...'.
> 
> 
> I get instead:
> 
> syntax: misplaced ellipses in template in: ...
> 
> Why is this the case?

The macro `(f ...)' expands to `(syntax ...)', which is indeed a syntax
error.

I think you meant

(define-syntax f
   (syntax-rules ()
     [(f id)
      (... id)]))     ; no `syntax'


Matthew



Posted on the users mailing list.