▼ |  | The Typed Racket Reference

1 | Type Reference
2 | Special Form Reference
3 | Libraries Provided With Typed Racket
4 | Utilities
5 | Typed Racket Syntax Without Type Checking
6 | Typed Regions
7 | Optimization in Typed Racket
8 | Legacy Forms
9 | Compatibility Languages
10 | Experimental Features

On this page:

Class
Instance
: type
: print-type
: query-result-type
declare-refinement
Refinement
define-typed-struct/ exec

Version: 5.3
top← prev up next →

### 10`` Experimental Features

These features are currently experimental and subject to change.

> syntax (Class args ...)

A type constructor for typing classes created using racket/class.

> syntax (Instance c)

A type constructor for typing objects created using racket/class.

> 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-result-type 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.

> syntax (declare-refinement id)

Declares id to be usable in refinement types.

> syntax (Refinement id)

Includes values that have been tested with the predicate id, which must have been specified with declare-refinement.

> syntax (define-typed-struct/exec forms ...)

Defines an executable structure.
top← prev up next →