<div dir="ltr">I think you can just add it to for.rktl:<div><br></div><div><div>(test '(1 2 3)</div><div> 'put-a-descriptive-name-here</div><div> (let ()</div><div> (define (in-X #:x seq) seq)</div>
<div> (for/list ([x (in-X #:x '(1 2 3))]) x)</div><div> ;; => '(1 2 3)</div><div> (define-sequence-syntax in-X* (lambda () #'in-X) (lambda (stx) #f))</div><div> (for/list ([x (in-X* #:x '(1 2 3))]) x)))</div>
</div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Feb 6, 2013 at 7:42 PM, Ryan Culpepper <span dir="ltr"><<a href="mailto:ryanc@ccs.neu.edu" target="_blank">ryanc@ccs.neu.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">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:<br>
<br>
(define (in-X #:x seq) seq)<br>
(for/list ([x (in-X #:x '(1 2 3))]) x)<br>
;; => '(1 2 3)<br>
(define-sequence-syntax in-X* (lambda () #'in-X) (lambda (stx) #f))<br>
(for/list ([x (in-X* #:x '(1 2 3))]) x)<br>
;; => '(1 2 3), previously syntax error<br>
<br>
Ryan<div class="im"><br>
<br>
<br>
On 02/06/2013 08:08 PM, Robby Findler wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
Test case?<br>
<br>
Robby<br>
<br>
<br>
On Wed, Feb 6, 2013 at 5:08 PM, <<a href="mailto:ryanc@racket-lang.org" target="_blank">ryanc@racket-lang.org</a><br></div><div class="im">
<mailto:<a href="mailto:ryanc@racket-lang.org" target="_blank">ryanc@racket-lang.org</a>><u></u>> wrote:<br>
<br>
ryanc has updated `master' from 117c81e2a6 to a85a71984d.<br>
<a href="http://git.racket-lang.org/plt/117c81e2a6..a85a71984d" target="_blank">http://git.racket-lang.org/<u></u>plt/117c81e2a6..a85a71984d</a><br>
<br>
=====[ One Commit ]=============================<u></u>========================<br>
Directory summary:<br>
100.0% collects/racket/private/<br>
<br>
~~~~~~~~~~<br>
<br>
a85a719 Ryan Culpepper <<a href="mailto:ryanc@racket-lang.org" target="_blank">ryanc@racket-lang.org</a><br></div>
<mailto:<a href="mailto:ryanc@racket-lang.org" target="_blank">ryanc@racket-lang.org</a>><u></u>> 2013-02-06 17:55<div class="im"><br>
:<br>
| preserve lexical context, src, etc for sequence syntax expansion<br>
|<br>
| The previous version of the code replaced the implicit #%app with<br>
| the kernel #%app (ie, #%plain-app), causing sequence functions<br>
| that take keyword arguments to fail.<br>
:<br>
M collects/racket/private/for.<u></u>rkt | 3 ++-<br>
<br>
=====[ Overall Diff ]=============================<u></u>======================<br>
<br>
collects/racket/private/for.<u></u>rkt<br>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<u></u>~<br>
--- OLD/collects/racket/private/<u></u>for.rkt<br>
+++ NEW/collects/racket/private/<u></u>for.rkt<br>
@@ -118,7 +118,8 @@<br>
(if (identifier? stx)<br>
(proc1)<br>
(datum->syntax stx<br>
- #`(#,(proc1) . #,(cdr (syntax-e stx)))<br>
+ ;; Use cons, not #`(#,op #,@args),<br>
to avoid replacing implicit #%app binding<br>
+ (cons (proc1) (cdr (syntax-e stx)))<br>
stx<br>
stx)))<br>
proc1)<br>
<br>
<br>
<br>
<br></div>
_________________________<br>
Racket Developers list:<br>
<a href="http://lists.racket-lang.org/dev" target="_blank">http://lists.racket-lang.org/<u></u>dev</a><br>
<br>
</blockquote>
<br>
</blockquote></div><br></div>