From 2f3e989cf58c89e606a147a380ea93714dfef7af Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Fri, 12 Dec 2014 08:21:30 -0700 Subject: [PATCH] repair quadraic behavior for a Scribble document's top level The recursive macro used by `#%module-begin` had a `...` in a pattern that only matches once, but the match is attempted every time around, and the `...` list accumulated the body of the module. Thanks to Shriram Krishnamurthi for reporting the problem. --- scribble-lib/scribble/doclang.rkt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scribble-lib/scribble/doclang.rkt b/scribble-lib/scribble/doclang.rkt index f3d781dc..ba540db3 100644 --- a/scribble-lib/scribble/doclang.rkt +++ b/scribble-lib/scribble/doclang.rkt @@ -17,9 +17,9 @@ (define-syntax (doc-begin stx) (syntax-case stx () - [(_ m-id post-process (expr ...)) + [(_ m-id post-process exprs) #`(begin - (define m-id (post-process (decode (list . #,(reverse (syntax->list #'(expr ...))))))) + (define m-id (post-process (decode (list . #,(reverse (syntax->list #'exprs)))))) (provide m-id))] [(_ m-id post-process exprs . body) ;; `body' probably starts with lots of string constants; it's