1 Language Model
2 Syntactic Forms
3 Datatypes
4 Structures
5 Classes and Objects
6 Units
7 Contracts
8 Pattern Matching
9 Control Flow
10 Concurrency
11 Macros
12 Input and Output
13 Reflection and Security
14 Operating System
15 Memory Management
16 Running PLT Scheme
Bibliography
Index
Version: 4.0.2

 

6.10 Single-Signature Modules

 #lang scheme/signature

The scheme/signature language treats a module body as a unit signature.

The body must match the following module-body grammar:

  module-body

 

=

 

(require require-spec ...) ... sig-spec ...

See Creating Units for the grammar of sig-spec. Unlike the body of a scheme/unit module, a require in a scheme/signature module must be a literal use of require.

The resulting signature is exported as base^, where base is derived from the enclosing module’s name (i.e., its symbolic name, or its path without the directory and file suffix). If the module name ends in -sig, then base corresponds to the module name before -sig. Otherwise, the module name serves as base.