From c5193f7da72709f7e7cf9dc4d8824ef592acc7ba Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Mon, 27 Feb 2012 09:51:01 -0600 Subject: [PATCH] fix a bug in define-union-language (this bug was somehow already covered by the existing test suites and also make pretty much every define-union-language break) --- collects/redex/private/reduction-semantics.rkt | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/collects/redex/private/reduction-semantics.rkt b/collects/redex/private/reduction-semantics.rkt index fae888b160..318db1833e 100644 --- a/collects/redex/private/reduction-semantics.rkt +++ b/collects/redex/private/reduction-semantics.rkt @@ -2676,12 +2676,14 @@ (define (union-language old-langs/prefixes) (define new-nt-map - (for/list ([old-pr (in-list old-langs/prefixes)]) - (define prefix (list-ref old-pr 0)) - (define nt-map (compiled-lang-nt-map (list-ref old-pr 1))) - (for/list ([lst (in-list nt-map)]) - (for/list ([sym (in-list lst)]) - (string->symbol (string-append prefix (symbol->string sym))))))) + (apply + append + (for/list ([old-pr (in-list old-langs/prefixes)]) + (define prefix (list-ref old-pr 0)) + (define nt-map (compiled-lang-nt-map (list-ref old-pr 1))) + (for/list ([lst (in-list nt-map)]) + (for/list ([sym (in-list lst)]) + (string->symbol (string-append prefix (symbol->string sym)))))))) (define new-nts (apply