From 1b62cdfd5ac3891e1eaa4807e67d9a8efed8fb81 Mon Sep 17 00:00:00 2001 From: Benjamin Greenman Date: Mon, 6 Mar 2017 11:21:13 -0500 Subject: [PATCH] doc: comment on values vs. All (#508) An `(All (A) ....)` doesn't quantify over `(Values ....)` types --- .../typed-racket/scribblings/reference/types.scrbl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/typed-racket-doc/typed-racket/scribblings/reference/types.scrbl b/typed-racket-doc/typed-racket/scribblings/reference/types.scrbl index b8d43786..c56b606e 100644 --- a/typed-racket-doc/typed-racket/scribblings/reference/types.scrbl +++ b/typed-racket-doc/typed-racket/scribblings/reference/types.scrbl @@ -775,6 +775,9 @@ functions and continuation mark functions. types @racket[t ...]. This can only appear as the return type of a function. @ex[(values 1 2 3)]} +Note that a type variable cannot be instantiated with a @racket[(Values ....)] +type. For example, the type @racket[(All (A) (-> A))] describes a thunk that +returns exactly one value. @defform/none[v]{where @racket[v] is a number, boolean or string, is the singleton type containing only that value} @defform/none[(quote val)]{where @racket[val] is a Racket value, is the singleton type containing only that value} @defform/none[i]{where @racket[i] is an identifier can be a reference to a type