Change contract on change-contract-fixups

The context should provide a flattened list of syntax
to the function.
This commit is contained in:
Asumu Takikawa 2014-11-04 17:00:15 -05:00
parent ff0c101a64
commit 4d806fb02d
2 changed files with 4 additions and 2 deletions

View File

@ -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

View File

@ -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)