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:
parent
8545f421ab
commit
b9408e545e
|
@ -234,18 +234,19 @@ 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
|
||||||
#,(syntax-property
|
(ann
|
||||||
#`(let-values (((val) #,(syntax-property #'(ann v Any) 'with-type #t)))
|
#,(syntax-property
|
||||||
(contract
|
#`(let-values (((val) #,(syntax-property #'(ann v Any) 'with-type #t)))
|
||||||
#,ctc-expr
|
(contract
|
||||||
val
|
#,ctc-expr
|
||||||
'cast
|
val
|
||||||
'typed-world
|
'cast
|
||||||
val
|
'typed-world
|
||||||
(quote-syntax #,stx)))
|
val
|
||||||
'typechecker:ignore-some #t)
|
(quote-syntax #,stx)))
|
||||||
ty))
|
'typechecker:ignore-some #t)
|
||||||
|
ty)))
|
||||||
|
|
||||||
(if (syntax-transforming-module-expression?)
|
(if (syntax-transforming-module-expression?)
|
||||||
(let ((ctc (syntax-local-lift-expression
|
(let ((ctc (syntax-local-lift-expression
|
||||||
|
|
Loading…
Reference in New Issue
Block a user