[previous] [up] [next]     [index]
Next: Signed Compound Units Up: Units with Signatures Previous: Flattening Signatures

Signed Units

The unit/sig form creates a signed unit:

  (unit/sig signature 
    (import import-element  tex2html_wrap_inline100181 ) 
    renames 
    signed-unit-body-expr 
     tex2html_wrap_inline100181 )

import-element is one of: signature (identifier : signature)

renames is either empty or: (rename (internal-variable signature-variable) tex2html_wrap_inline100181 )

signed-unit-body-expr is one of: (include filename) unit-body-expr

The signature immediately following unit/sig specifies the export signature of the signed unit. This signature cannot contain sub-signatures. Each element of the signature must have a corresponding variable definition in one of the unit-body-exprs, modulo the optional rename clause. If the rename clause is present, it maps internal-variables defined in the unit-body-exprs to signature-variables in the export signature.

The import-elements specify imports for the signed unit. The names bound within the signed-unit-body-exprs to imported bindings are constructed by flattening the signatures according to the algorithm in section 7.3.1.1:

Each signed-unit-body-expr is either a regular expression or an include form. If a signed-unit-body-expr has the form (include filename), the content of the file named by filename is textually substituted into the unit/sig body in the place of the include clause. In particular, a single include clause can be replaced by any number of expressions from the included file.



PLT