7 Units
On this page:
top
up

7.7Extending the Syntax of SignaturesπŸ”— i

syntax

( define-signature-form sig-form-idexpr)

(define-signature-form (sig-form-idid)body...+)
(define-signature-form (sig-form-ididintro-id)body...+)
Binds sig-form-id for use within a define-signature form.

In the first form, the result of expr must be a transformer procedure that accepts one argument. In the second form, sig-form-id is bound to a transformer procedure whose argument is id and whose body is the bodys. The third form is like the second one, but intro-id is bound to a procedure that is analogous to syntax-local-introduce for the signature-form expansion.

The result of the transformer procedure must be a list of syntax objects, which are substituted for a use of sig-form-id in a define-signature expansion. (The result is a list so that the transformer can produce multiple declarations; define-signature has no splicing begin form.)

Changed in version 8.1.0.7 of package base: Added support for the form with a transformer expr.

syntax

( struct/ctc id([fieldcontract-expr]...)struct-option...)

field = id
| [id#:mutable]
struct-option = #:mutable
| #:omit-constructor
| #:omit-define-syntaxes
| #:omit-define-values
For use with define-signature . The struct/ctc form works similarly to struct , but the constructor, predicate, field accessors, and field mutators are contracted appropriately.

top
up

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /