▼ |  | Dr Racket Plugins

1 | Implementing Dr Racket Plugins
2 | Adding Languages to Dr Racket
3 | Creating New Kinds of Dr Racket Frames
4 | Extending the Existing Dr Racket Classes
5 | Expanding the User’s Program Text and Breaking
6 | Editor Modes
7 | Language-Specific Capabilities
8 | Check Syntax
9 | Cooperating with Background Check Syntax
10 | Teaching Languages
11 | Signatures
12 | drracket: get/ extend
13 | drracket: unit
14 | drracket: language
15 | drracket: language-configuration
16 | drracket: debug
17 | drracket: rep
18 | drracket: frame
19 | drracket: help-desk
20 | drracket: eval
21 | drracket: modes
22 | drracket: module-language-tools
23 | drracket: module-language
24 | drracket: tracing
25 | Backwards Compatibility
| Index

On this page:

drracket: tool^
drracket: tool-exports^
phase1
phase2

top ← prev up next →

### 11`` Signatures

> signature drracket:tool^ : signature

> This signature includes all of the names in this manual that begin with drracket: (except these two signatures).

> signature drracket:tool-exports^ : signature

> The drracket:tool-exports^ signature contains two names: phase1 and phase2. After all of the tools are loaded, all of the phase1 functions are called and then all of the phase2 functions are called. Certain primitives can only be called during the dynamic extent of those calls.

> This mechanism is designed to support DrRacket’s drracket:language:language<%> extension capabilities. That is, this mechanism enables two tools to cooperate via new capabilities of languages. The first phase is used for adding functionality that each language must support and the second is used for creating instances of languages. As an example, a tool may require certain specialized language-specific information. It uses phase1 to extend the drracket:language:language<%> interface and supply a default implementation of the interface extension. Then, other languages that are aware of the extension can supply non-default implementations of the additional functionality.

> > procedure (phase1) → void?

> These functions can be called only in the dynamic extent of a call to phase1 (see above for details).

> - drracket:language:extend-language-interface

> - drracket:unit:add-to-program-editor-mixin

> > procedure (phase2) → void?

> These functions can be called only in the dynamic extent of a call to phase2 (see above for details).

> - drracket:language-configuration:add-language

> - drracket:language:get-default-mixin

> - drracket:language:get-language-extensions

top ← prev up next →