Version: 5.3.1
5 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.
syntax
(:type t)
Prints the type t.
syntax
(:print-type e)
Prints the type of e. This prints the whole
type, which can sometimes be quite large.
syntax
(:query-type/args f t ...)
Given a function f and argument
types t, shows the result type of f.
syntax
(:query-type/result f t)
Given a function f and a desired
return type t, shows the arguments types f should be given to
return a value of type t.