fix reconstruction of `provide' forms in module expansion

This commit is contained in:
Matthew Flatt 2011-12-02 13:58:19 -07:00
parent 9417503492
commit 7397f710e2
2 changed files with 17 additions and 1 deletions

View File

@ -665,6 +665,21 @@
(define printf 'ok!))
(require 'phase-providing-check)
;; ----------------------------------------
;; Check reconstruction of `provide' forms:
(test #t
'provide
(syntax-case (expand '(module m racket
(define-for-syntax x 8)
(provide (for-meta 1 x)))) ()
[(module m racket
(#%module-begin
defn
(#%provide (for-meta 1 x))))
#t]
[else #f]))
;; ----------------------------------------
(report-errs)

View File

@ -9141,7 +9141,8 @@ void parse_provides(Scheme_Object *form, Scheme_Object *fst, Scheme_Object *e,
}
if (!SAME_OBJ(mode, scheme_make_integer(0))) {
Scheme_Object *f;
f = SCHEME_STX_CAR(mode_stx);
f = SCHEME_STX_CDR(mode_stx);
f = SCHEME_STX_CAR(f);
a = scheme_make_pair(for_meta_symbol,
scheme_make_pair(f,
scheme_make_pair(a, scheme_null)));