Re: [racket-dev] Problem with Values type constructor

2014-07-28 Thread Asumu Takikawa
On 2014-07-23 20:20:56 +0100, Antonio Menezes Leitao wrote:
Although the typed racket documentation mentions Values as a type
constructor, it does not work:

[...]

Am I missing something?

Nope, this is just a bug. Thanks for the report. I've pushed a fix to
git.

Cheers,
Asumu
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


[racket-dev] Problem with Values type constructor

2014-07-23 Thread Antonio Menezes Leitao
Hi,

Although the typed racket documentation mentions Values as a type
constructor, it does not work:

Welcome to DrRacket, version 6.1.0.3--2014-07-18(e827817/a) [3m].
Language: typed/racket; memory limit: 1024 MB.
 (define (foo) : (Values Number Number) (values 1 2))
. Type Checker: parse error in type;
 type name `Values' is unbound in: Values
. Type Checker: wrong number of values: expected 1 but got 2 in: (values 1
2)
. Type Checker: Summary: 2 errors encountered in:
  Values
  (values 1 2)

OTOH, the lowercase values seems to work as a type constructor.

 (define (bar) : (values Number Number) (values 1 2))
 bar
- : (- (values Number Number))
#procedure:bar

Moreover, there is some kind of confusion between values and Values:

 (values 1 2)
- : (values Integer Integer) [more precisely: (Values One Positive-Byte)]
1
2

Am I missing something?

Best,
António.
_
  Racket Developers list:
  http://lists.racket-lang.org/dev