A signature expression is a sequence of signature elements:
(sig-element
)
Each signature element has one of the following forms:
id
(struct id (id
) omission
)
(unit id : signature)
(open signature)
Two signatures exactly match when they have the same variable identifiers and matching sub-signatures with the same names all in the same order. A signature conservatively matches another signature when it has the same names in the same order, but also contains additional names.
The define-signature form binds a signature to an identifier:
(define-signature id signature)
In unit and open clauses of a signature, signature can either be an inline signature specification or a bound signature identifier. The same is true for define-signature and all occurrences of a signature in unit/sig, compound-unit/sig, invoke-unit/sig, invoke-open-unit/sig, and unit->unit/sig expressions.
The let-signature form binds a signature to an identifier within a body of expressions. Embedded define-signature expressions are transformed into let-signature expressions.