[racket] Unbound identifier bug in contracts?
Yes, that's a bug. I've pushed a fix. Thanks for the test case!
Robby
On Tue, Jul 22, 2014 at 7:18 PM, Brian Adkins <racketusers at lojic.com> wrote:
> On Jul 22, 2014, at 8:03 PM, Brian Adkins wrote:
>> Does this seem like a bug? I'm running DRRacket 6.0.1 on Mac OSX 10.6.8.
>>
>> Given:
>>
>> (define (valid? a b)
>> (< a b))
>>
>> Case 1 - works fine:
>>
>> (define/contract (foo a b)
>> (->i ([x (z) (curry valid? z)] [z any/c]) any)
>> (+ a b))
>>
>> Case 2 (adding a 3rd arg) - results in:
>> "z10: unbound identifier;
>> also, no #%top syntax transformer is bound in: z10"
>>
>> (define/contract (foo a b c)
>> (->i ([x (z) (curry valid? z)] [y any/c] [z any/c]) any)
>> (+ a b))
>
> Sorry, I included valid? because it was in my earlier test cases, I can simplify this to something nearly identical to the example in 8.2 of the Racket Reference:
>
> (define/contract (foo a b c)
> (->i ([x (z) (>=/c z)] [y any/c] [z any/c]) any)
> (+ a b))
>
> results in:
>
> "z10: unbound identifier;
> also, no #%top syntax transformer is bound in: z10"
>
> Remove c & y, and it works fine.
>
>
>
> ____________________
> Racket Users list:
> http://lists.racket-lang.org/users