[previous] [up] [next]     [contents] [index]
Next: Mixing Core and Signed Up: Units with Signatures Previous: Signed Compound Units

Invoking Signed Units

Signed units are invoked using the invoke-unit/sig form:

  (invoke-unit/sig expr invoke-linkage  tex2html_wrap_inline12550 )

invoke-linkage is one of: signature (identifier : signature)

If the invoked unit requires no imports, the invoke-unit/sig form is used in the same way as invoke-unit. Otherwise, the invoke-linkage signatures must match the import signatures of the signed unit to be invoked. If the signatures match, then variables in the environment of the invoke-unit/sig expression are used for immediate linking; the variables used for linking are the ones with names corresponding to the flattened signatures. The signature flattening algorithm is specified in section 7.3.1.1; when the (identifier : signature) form is used, identifier: is prefixed onto each variable name in the flattened signature and the prefixed name is used.

The syntax for invoke-open-unit/sig is similar:

  (invoke-open-unit/sig expr name-specifier invoke-linkage  tex2html_wrap_inline12550 ) 

The invoke-open-unit/sig form uses the invoke-linkage specifications in the same way as invoke-unit/sig, and bindings are set in the current namespace just as by invoke-open-unit. (As with invoke-open-unit, the name-specifier can be omitted if no invoke-linkages are provided.) The names of the variables that are bound are determined by the flattened export signature of the invoked signed unit.



PLT