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

From: Ryan Culpepper (ryanc at ccs.neu.edu)
Date: Wed Feb 6 20:42:56 EST 2013

I sent a test case to Matthew, since I wasn't sure how best to include 
it: it is a syntax error in the old version of the code. Here it is:

   (define (in-X #:x seq) seq)
   (for/list ([x (in-X #:x '(1 2 3))]) x)
   ;; => '(1 2 3)
   (define-sequence-syntax in-X* (lambda () #'in-X) (lambda (stx) #f))
   (for/list ([x (in-X* #:x '(1 2 3))]) x)
   ;; => '(1 2 3), previously syntax error

Ryan


On 02/06/2013 08:08 PM, Robby Findler wrote:
> Test case?
>
> Robby
>
>
> On Wed, Feb 6, 2013 at 5:08 PM, <ryanc at racket-lang.org
> <mailto:ryanc at racket-lang.org>> wrote:
>
>     ryanc has updated `master' from 117c81e2a6 to a85a71984d.
>     http://git.racket-lang.org/plt/117c81e2a6..a85a71984d
>
>     =====[ One Commit ]=====================================================
>     Directory summary:
>       100.0% collects/racket/private/
>
>     ~~~~~~~~~~
>
>     a85a719 Ryan Culpepper <ryanc at racket-lang.org
>     <mailto:ryanc at racket-lang.org>> 2013-02-06 17:55
>     :
>     | preserve lexical context, src, etc for sequence syntax expansion
>     |
>     | The previous version of the code replaced the implicit #%app with
>     | the kernel #%app (ie, #%plain-app), causing sequence functions
>     | that take keyword arguments to fail.
>     :
>        M collects/racket/private/for.rkt | 3 ++-
>
>     =====[ Overall Diff ]===================================================
>
>     collects/racket/private/for.rkt
>     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>     --- OLD/collects/racket/private/for.rkt
>     +++ NEW/collects/racket/private/for.rkt
>     @@ -118,7 +118,8 @@
>                    (if (identifier? stx)
>                        (proc1)
>                        (datum->syntax stx
>     -                                #`(#,(proc1) . #,(cdr (syntax-e stx)))
>     +                                ;; Use cons, not #`(#,op #, at args),
>     to avoid replacing implicit #%app binding
>     +                                (cons (proc1) (cdr (syntax-e stx)))
>                                       stx
>                                       stx)))
>                  proc1)
>
>
>
>
> _________________________
>    Racket Developers list:
>    http://lists.racket-lang.org/dev
>


Posted on the dev mailing list.