[racket-dev] [plt] Push #21108: master branch updated

From: Casey Klein (clklein at eecs.northwestern.edu)
Date: Fri Sep 17 12:50:32 EDT 2010

On Fri, Sep 17, 2010 at 11:39 AM,  <robby at racket-lang.org> wrote:
> robby has updated `master' from c6fc7137ee to ce211ac364.
>  http://git.racket-lang.org/plt/c6fc7137ee..ce211ac364
>
> =====[ 1 Commits ]======================================================
>
> Directory summary:
>  10.1% collects/redex/private/
>  83.2% collects/redex/tests/bmps-macosx/
>   6.6% collects/redex/tests/
>
> ~~~~~~~~~~
>
> ce211ac Robby Findler <robby at racket-lang.org> 2010-09-17 11:39
> :
> | adjusted metafunction application rendering so that ellipses do not
> | get commas put in front of them
> :

FWIW, if I were typesetting this example by hand, I would have done it
the old way

   rdups[| x_1, x_2, ..., x_1, x_3, ... |]

not the new way

   rdups[| x_1, x_2 ..., x_1, x_3 ... |]

but maybe I'm alone in that preference.

>  M collects/redex/private/core-layout.rkt |   10 +++++++---
>  M collects/redex/tests/bitmap-test.rkt   |   12 ++++++++++++
>  A collects/redex/tests/bmps-macosx/rdups.png
>
> =====[ Overall Diff ]===================================================
>
> collects/redex/private/core-layout.rkt
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> --- OLD/collects/redex/private/core-layout.rkt
> +++ NEW/collects/redex/private/core-layout.rkt
> @@ -258,9 +258,13 @@
>                         (just-after (close-white-square-bracket) last)))]
>                [(null? (cddr lst))
>                 (cons (car lst) (loop (cdr lst)))]
> -               [else (list* (car lst)
> -                            (just-after (basic-text "," (default-style)) (car lst))
> -                            (loop (cdr lst)))]))))
> +               [else
> +                (if (eq? '... (lw-e (cadr lst)))
> +                    (cons (car lst)
> +                          (loop (cdr lst)))
> +                    (list* (car lst)
> +                           (just-after (basic-text "," (default-style)) (car lst))
> +                           (loop (cdr lst))))]))))
>
>   (define (just-before what lw)
>     (build-lw (if (symbol? what)
>
> collects/redex/tests/bitmap-test.rkt
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> --- OLD/collects/redex/tests/bitmap-test.rkt
> +++ NEW/collects/redex/tests/bitmap-test.rkt
> @@ -187,6 +187,18 @@
>  ;; make sure two metafunctions simultaneously rewritten line up properly
>  (test (render-metafunctions S T TL) "metafunctions-multiple.png")
>
> +;; make sure that the ellipses don't have commas before them.
> +(define-metafunction lang
> +  rdups : x ... -> (x ...)
> +  [(rdups x_1 x_2 ... x_1 x_3 ...)
> +   (rdups x_2 ... x_1 x_3 ...)]
> +  [(rdups x_1 x_2 ...)
> +   (x_1 x_3 ...)
> +   (where (x_3 ...) (rdups x_2 ...))]
> +  [(rdups) ()])
> +
> +(test (render-metafunction rdups) "rdups.png")
> +
>  ;; Non-terminal superscripts
>  (test (render-lw lang (to-lw (x_^abcdef x_q^abcdef)))
>       "superscripts.png")
>
> collects/redex/tests/bmps-macosx/rdups.png
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Binary files /dev/null and NEW/collects/redex/tests/bmps-macosx/rdups.png differ
>


Posted on the dev mailing list.