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
On this page:
unit-static-signatures
signature-members
Version: 4.0.2

 

6.11 Transformer Helpers

 (require scheme/unit-exptime)

The scheme/unit-exptime library provides procedures that are intended for use by macro transformers. In particular, the library is typically imported using for-syntax into a module that defines macro with define-syntax.

(unit-static-signatures

 

unit-identifier

 

 

 

err-syntax)

 

 

 

(list/c (cons/c (or/c symbol? false/c)

                identifier?))

(list/c (cons/c (or/c symbol? false/c)

                identifier?))

  unit-identifier : identifier?

  err-syntax : syntax?

If unit-identifier is bound to static unit information via define-unit (or other such forms), the result is two values. The first value is for the unit’s imports, and the second is for the unit’s exports. Each result value is a list, where each list element pairs a symbol or #f with an identifier. The symbol or #f indicates the import’s or export’s tag (where #f indicates no tag), and the identifier indicates the binding of the corresponding signature.

If unit-identifier is not bound to static unit information, then the exn:fail:syntax exception is raised. In that case, the given err-syntax argument is used as the source of the error, where unit-identifer is used as the detail source location.

(signature-members

 

sig-identifier

 

 

 

 

 

 

err-syntax)

 

 

(or/c identifier? false/c)

(listof identifier?)

(listof identifier?)

(listof identifier?)

  sig-identifier : identifier?

  err-syntax : syntax?

If sig-identifier is bound to static unit information via define-signature (or other such forms), the result is four values:

If sig-identifier is not bound to a signature, then the exn:fail:syntax exception is raised. In that case, the given err-syntax argument is used as the source of the error, where sig-identifier is used as the detail source location.