[racket-dev] possible 5.2.900.1 bug involving rest argument

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Sat Jul 28 20:28:42 EDT 2012

I believe Ryan fixed this a few hours ago. He may be waiting for a
release build before commenting.

Robby

On Sat, Jul 28, 2012 at 7:25 PM, Eli Barzilay <eli at barzilay.org> wrote:
> 6 hours ago, Neil Van Dyke wrote:
>> Looks like a minor compiler/optimizer bug in Friday's 5.2.900.1
>> pre-release.
>>
>> I haven't yet found a simpler test case, but you can reproduce by
>> installing a particular PLaneT package as shown below.
>>
>> The line 1275 it's complaining about is the following, which starts
>> a procedure definition that is later applied at toplevel in the same
>> module:
>>
>> (define (charterm-make-keydec keydec-id . keysets)
>>
>> The demo program for this PLaneT package seems to run correctly despite
>> these install/compile-time error messages.
>
> I tried to track this, and I don't think that it's a compiler bug...
> It looks like it's a failure at the stage of compiling the docs which
> would explain why the code runs fine.
>
> The problem looks like something in syntax/parse -- either there or it
> doesn't do enough checking of its input.  A small example that shows
> it:
>
>   #lang racket/base
>   (require syntax/parse)
>   (syntax-parse #'(X Y . Z) [(NAME:id ARGn ...) 1] [else 1])
>
> which produces the following error:
>
>   andmap: contract violation
>     expected: list?
>     given: '(#<syntax:/tmp/zzz:5:19 Y> . #<syntax:/tmp/zzz:5:23 Z>)
>     argument position: 2nd
>     other arguments...:
>      #<procedure:void>
>     context...:
>      /home/scheme/html/release/racket/collects/syntax/parse/private/residual.rkt:206:0: predicate-ellipsis-parser
>      /tmp/zzz: [running body]
>
> and the trace that points at synax/parse/private/residual.rkt was
> there when I tried your original line, so I think that it's the right
> error.
>
> (I'll let Ryan take it from here, I just did a semi-blind tracking...)
>
> --
>           ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
>                     http://barzilay.org/                   Maze is Life!
> _________________________
>   Racket Developers list:
>   http://lists.racket-lang.org/dev

Posted on the dev mailing list.