14 Compatibility Languages

▼ |  | The Typed Racket Reference

1 | Type Reference
2 | Special Form Reference
3 | Libraries Provided With Typed Racket
4 | Typed Classes
5 | Typed Units
6 | Utilities
7 | Exploring Types
8 | Deep, Shallow, and Optional Semantics
9 | Typed Racket Syntax Without Type Checking
10 | Typed Regions
11 | Optimization in Typed Racket
12 | Unsafe Typed Racket operations
13 | Legacy Forms
14 | Compatibility Languages
15 | Experimental Features
| Bibliography
| Index

On this page:

require/ typed
require-typed-struct

8.17
top contents ← prev up next →

### 14`` Compatibility Languages🔗ℹ

#lang typed/scheme | package: typed-racket-compatibility
#lang typed/scheme/base
#lang typed-scheme

Typed versions of the

> #lang scheme

and

> #lang scheme/base

languages. The

> #lang typed-scheme

language is equivalent to the

> #lang typed/scheme/base

language.

> syntax (require/typed m rt-clause ...)
> rt-clause |  | = |  | [r t]
> [struct name ([f : t] ...)
> struct-option ...]
> [struct (name parent) ([f : t] ...)
> struct-option ...]
> |  | | |  | [opaque t pred]
> struct-option |  | = |  | #:constructor-name constructor-id
> |  | | |  | #:extra-constructor-name constructor-id

Similar to require/typed, but as if #:extra-constructor-name make-name was supplied.

> syntax require-typed-struct

Similar to using the struct keyword with require/typed.
top contents ← prev up next →