Change contract on change-contract-fixups
The context should provide a flattened list of syntax to the function.
This commit is contained in:
parent
ff0c101a64
commit
4d806fb02d
|
@ -34,7 +34,9 @@
|
|||
;; perform the provide transformation from [Culpepper 07]
|
||||
[transformed-body (begin0 (remove-provides #'body2) (do-time "Removed provides"))]
|
||||
;; add the real definitions of contracts on requires
|
||||
[transformed-body (begin0 (change-contract-fixups #'transformed-body) (do-time "Fixed contract ids"))]
|
||||
[transformed-body
|
||||
(begin0 (change-contract-fixups (syntax->list #'transformed-body))
|
||||
(do-time "Fixed contract ids"))]
|
||||
;; add the real definitions of contracts on the after-code
|
||||
[(after-code ...) (change-provide-fixups (flatten-all-begins pre-after-code))]
|
||||
;; potentially optimize the code based on the type information
|
||||
|
|
|
@ -150,7 +150,7 @@
|
|||
(define include-extra-requires? (box #f))
|
||||
|
||||
(define (change-contract-fixups forms)
|
||||
(for/list ((e (in-syntax forms)))
|
||||
(for/list ((e (in-list forms)))
|
||||
(if (not (define/fixup-contract? e))
|
||||
e
|
||||
(begin (set-box! include-extra-requires? #t)
|
||||
|
|
Loading…
Reference in New Issue
Block a user