From 8d1b82bcd21e42fcc2df2827291a8264aef189d9 Mon Sep 17 00:00:00 2001 From: Stevie Strickland Date: Fri, 9 Jan 2009 00:59:04 +0000 Subject: [PATCH] There's no need for the special-casing define-values with one binding, so simplify this. svn: r13044 --- collects/mzlib/unit.ss | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/collects/mzlib/unit.ss b/collects/mzlib/unit.ss index db1b3e027e..671c66a6ca 100644 --- a/collects/mzlib/unit.ss +++ b/collects/mzlib/unit.ss @@ -715,7 +715,7 @@ id)) ids tmps) expr))] [do-one - (lambda (id tmp name) + (lambda (id tmp) (let ([unit-name (syntax-local-infer-name (error-syntax))] [export-loc @@ -734,21 +734,15 @@ (list (quasisyntax/loc defn-or-expr (set-box! #,export-loc - #,(if name - #`(let ([#,name #,(if add-ctc (add-ctc tmp) tmp)]) - #,name) - tmp))) + (let ([#,id #,(if add-ctc (add-ctc tmp) tmp)]) + #,id))) (quasisyntax/loc defn-or-expr - (define-syntax #,id (make-id-mapper (quote-syntax #,tmp)))))) + (define-syntax #,id + (make-id-mapper (quote-syntax #,tmp)))))) (else ;; not an exported id null))))]) - (if (null? (cdr ids)) - (cons new-defn (do-one (car ids) (car tmps) (car ids))) - (cons new-defn (apply append - (map (lambda (id tmp) - (do-one id tmp #f)) - ids tmps)))))] + (cons new-defn (apply append (map do-one ids tmps))))] [else (list defn-or-expr)])) expanded-body))]) #'(begin-with-definitions