Add a separate "Exploring Types" section to the TR reference.
This commit is contained in:
parent
e3ffd5f85c
commit
28c85dfd25
|
@ -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.}
|
||||
|
||||
|
|
|
@ -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].}
|
|
@ -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"]
|
||||
|
|
Loading…
Reference in New Issue
Block a user