.
original commit: 738f4aa026a799bd4ef410936b08a352f7b3ba57
This commit is contained in:
parent
a3892e3a10
commit
cd288c2652
|
@ -268,7 +268,13 @@ add struct contracts for immutable structs?
|
|||
#f)]
|
||||
[(field-contracts ...) field-contracts]
|
||||
[(field-contract-ids ...) field-contract-ids]
|
||||
[struct-name struct-name])
|
||||
[struct-name struct-name]
|
||||
[struct:struct-name (datum->syntax-object
|
||||
struct-name
|
||||
(string->symbol
|
||||
(string-append
|
||||
"struct:"
|
||||
(symbol->string (syntax-e struct-name)))))])
|
||||
(syntax/loc stx
|
||||
(begin
|
||||
(define field-contract-ids field-contracts) ...
|
||||
|
@ -276,7 +282,7 @@ add struct contracts for immutable structs?
|
|||
mutator-codes ...
|
||||
predicate-code
|
||||
constructor-code
|
||||
(provide struct-name))))))
|
||||
(provide struct-name struct:struct-name))))))
|
||||
|
||||
;; build-constructor-contract : syntax (listof syntax) syntax -> syntax
|
||||
(define (build-constructor-contract stx field-contract-ids predicate-id)
|
||||
|
|
Loading…
Reference in New Issue
Block a user