▼ |  | Dr Racket Plugins

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

On this page:

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

top ← prev up next →

### 12`` 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 →