[racket] Typed Racket procedure wrapping?

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Wed Feb 6 07:34:42 EST 2013

You don't get the same message-- the expected line is gone somehow.

Robby


On Tue, Feb 5, 2013 at 10:30 PM, Eric Dobson <eric.n.dobson at gmail.com>wrote:

> I don't get why TR should use a custom contract instead of case->
> providing better error messages.
>
> You get the same error message with:
>
> #lang racket
>
> (define/contract (f) (case->) 2)
> (f 2)
> ;(f)
>
>
> On Tue, Feb 5, 2013 at 8:10 PM, Matthias Felleisen <matthias at ccs.neu.edu>wrote:
>
>>
>> On Feb 5, 2013, at 4:17 PM, Asumu Takikawa wrote:
>>
>> >>
>> >>   In 5.3.2, when running untyped.rkt, I get:
>> >>
>> >>   #<case-lambda-procedure>: arity mismatch;
>> >>    the expected number of arguments does not match the given number
>> >>     given: 1
>> >>     arguments...:
>> >>      5
>> >
>> > I agree that this error message is bad. It's a result of changing the
>> > type `Procedure` to use the contract `(case->)`. Maybe we should use a
>> > custom contract here instead that produces a better error message.
>>
>>
>> AMEN!
>> ____________________
>>   Racket Users list:
>>   http://lists.racket-lang.org/users
>>
>
>
> ____________________
>   Racket Users list:
>   http://lists.racket-lang.org/users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20130206/62286998/attachment-0001.html>

Posted on the users mailing list.