original commit: 58883226424b22d866dd6fd642f05431e0aee16a
This commit is contained in:
Robby Findler 2005-01-20 16:33:04 +00:00
parent b33493ea8e
commit 3a7dd428fe

View File

@ -2989,7 +2989,17 @@ add struct contracts for immutable structs?
val))
(delay (p-app (force val))))))))))
#|
as with copy-struct in struct.ss, this first begin0
expansion "declares" that struct/c is an expression
preventing further expansion until the internal definition
context is sorted out.
|#
(define-syntax (struct/c stx)
(syntax-case stx ()
[(_ . args) (syntax (begin0 (do-struct/c . args)))]))
(define-syntax (do-struct/c stx)
(syntax-case stx ()
[(_ struct-name args ...)
(and (identifier? (syntax struct-name))