Wrap generated code in #%expression.

This allows tc-toplevel to hand it off to tc-expr, and not reimplement
the details of annotations.
This commit is contained in:
Eric Dobson 2012-08-08 21:12:12 -07:00 committed by Sam Tobin-Hochstadt
parent 8545f421ab
commit b9408e545e

View File

@ -234,7 +234,8 @@ This file defines two sorts of primitives. All of them are provided into any mod
(syntax-parse stx (syntax-parse stx
[(_ v:expr ty:expr) [(_ v:expr ty:expr)
(define (apply-contract ctc-expr) (define (apply-contract ctc-expr)
#`(ann #`(#%expression
(ann
#,(syntax-property #,(syntax-property
#`(let-values (((val) #,(syntax-property #'(ann v Any) 'with-type #t))) #`(let-values (((val) #,(syntax-property #'(ann v Any) 'with-type #t)))
(contract (contract
@ -245,7 +246,7 @@ This file defines two sorts of primitives. All of them are provided into any mod
val val
(quote-syntax #,stx))) (quote-syntax #,stx)))
'typechecker:ignore-some #t) 'typechecker:ignore-some #t)
ty)) ty)))
(if (syntax-transforming-module-expression?) (if (syntax-transforming-module-expression?)
(let ((ctc (syntax-local-lift-expression (let ((ctc (syntax-local-lift-expression