Add a separate "Exploring Types" section to the TR reference.

original commit: 28c85dfd253a6e386da14758d0e95e9ecdd0a6a9
This commit is contained in:
Vincent St-Amour 2012-08-07 15:17:11 -04:00
parent 1e1fb40d32
commit 0f24ab150d
3 changed files with 20 additions and 9 deletions

View File

@ -10,15 +10,6 @@ These features are currently experimental and subject to change.
@defform[(Class args ...)]{A type constructor for typing classes created using @racketmodname[racket/class].}
@defform[(Instance c)]{A type constructor for typing objects created using @racketmodname[racket/class].}
@defform[(:type t)]{Prints the type @racket[_t].}
@defform[(:print-type e)]{Prints the type of @racket[_e]. This prints the whole
type, which can sometimes be quite large.}
@defform[(:query-result-type f t)]{Given a function @racket[f] and a desired
return type @racket[t], shows the arguments types @racket[f] should be given to
return a value of type @racket[t].}
@defform[(declare-refinement id)]{Declares @racket[id] to be usable in
refinement types.}

View File

@ -0,0 +1,19 @@
#lang scribble/manual
@begin[(require "../utils.rkt")
(require (for-label (only-meta-in 0 [except-in typed/racket for])))]
@title{Exploring Types}
In addition to printing a summary of the types of REPL results, Typed Racket
provides interactive utilities to explore and query types.
The following bindings are only available at the Typed Racket REPL.
@defform[(:type t)]{Prints the type @racket[_t].}
@defform[(:print-type e)]{Prints the type of @racket[_e]. This prints the whole
type, which can sometimes be quite large.}
@defform[(:query-result-type f t)]{Given a function @racket[f] and a desired
return type @racket[t], shows the arguments types @racket[f] should be given to
return a value of type @racket[t].}

View File

@ -19,6 +19,7 @@
@include-section["reference/special-forms.scrbl"]
@include-section["reference/libraries.scrbl"]
@include-section["reference/utilities.scrbl"]
@include-section["reference/exploring-types.scrbl"]
@include-section["reference/no-check.scrbl"]
@include-section["reference/typed-regions.scrbl"]
@include-section["reference/optimization.scrbl"]