unit-exptime.ss: Unit Utilities for Macro Transformers
To load: (require (lib "unit-exptime.ss"))
The procedures of this library are meant to be used from macro
transformers. That is, the library is normally used via
(require-for-syntax (lib "unit-exptime.ss"))
.
(unit-static-signatures
unit-identifier err-syntax
)
PROCEDURE
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
)
PROCEDURE
If sig-identifier
is bound to static unit information via
define-signature
(or other such forms), the result is four
values:
an identifier or
#f
indicating the signature (of any) that is extended by thesig-identifier
binding;a list of identifiers representing the variables supplied/required by the signature;
a list of identifiers for variable definitions in the signature (i.e., variable bindings that are provided on import, but not defined by units that implement the signature); and
a list of identifiers with syntax definitions in the signature.
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-identifer
is used as the
detail source location.