Special Form Reference

Typed Scheme provides a variety of special forms above and beyond those in PLT Scheme. They are used for annotating variables with types, creating new types, and annotating expressions.

4.1  Binding Forms

loop, f, a, and v are names, t is a type. e and body are expressions.

4.2  Structure Defintions

name, parent, f, and v are names, t is a type. parent must name a structure type.

4.3  Type Aliases

name and v are names, t is a type.

4.4  Type Annotation

v is a variable name, e is an expression, t is a type.

These annotations require the use of the following declaration before the beginning of the module:

#reader (planet "typed-reader.ss"  ("plt" "typed-scheme.plt"))

This will not affect the reading or parsing of any other syntax.

4.5  Require

v is a variable name, t is a type, and m is a require-spec.