On this page:
: type
: print-type
: query-type/ args
: query-type/ result

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.


(:type t)

Prints the type t.


(:print-type e)

Prints the type of e. This prints the whole type, which can sometimes be quite large.


(:query-type/args f t ...)

Given a function f and argument types t, shows the result type of f.


(: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.