[racket-dev] procedure-result chaperone
I think maybe you've just found a bug. Do you have a program to share?
[robby at yanpu] ~/Downloads$ racket
Welcome to Racket v5.3.1.12.
> ((contract (-> integer? integer?) (lambda (x) (values 1 2)) 'pos 'neg) 1)
stdin::2: broke its contract
expected 1 value, returned 2 values
in: the range of
(-> integer? integer?)
contract from: pos
blaming: pos
context...:
/Users/robby/git/plt/collects/racket/contract/private/blame.rkt:89:0:
raise-blame-error
/Users/robby/git/plt/collects/racket/private/misc.rkt:87:7
On Sun, Jan 6, 2013 at 12:26 PM, Matthias Felleisen <matthias at ccs.neu.edu>wrote:
>
> Is this really the best we can do for a contracted first-order procedure
> that accidentally returns two values instead of one:
>
> Language: racket.
> . . procedure-result chaperone: arity mismatch;
> wrapper does not accept the number of values produced by
> the original procedure
> wrapper: #<procedure>
> number of values: 2
>
>
> ??
>
> -- Matthias
>
>
> _________________________
> Racket Developers list:
> http://lists.racket-lang.org/dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/dev/archive/attachments/20130106/0ec32995/attachment.html>