[racket-dev] Problem with Values type constructor

From: Antonio Menezes Leitao (antonio.menezes.leitao at ist.utl.pt)
Date: Wed Jul 23 15:20:56 EDT 2014


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

Welcome to DrRacket, version [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
. Type Checker: Summary: 2 errors encountered in:
  (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))

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

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

Am I missing something?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/dev/archive/attachments/20140723/f68372ec/attachment.html>

Posted on the dev mailing list.