repairing damage from introducing that traced-app into shared

This commit is contained in:
Danny Yoo 2011-08-30 16:51:05 -04:00
parent 768c393e1f
commit b46ff2a045
3 changed files with 21 additions and 15 deletions

View File

@ -25,21 +25,26 @@
stx
dup)))
(let ([exprs (map (lambda (expr)
(printf "before: ~s\n" (syntax->datum expr))
(let ([result
(let ([e (local-expand
expr
'expression
(append
(kernel-form-identifier-list)
names))])
(let ([e (local-expand
expr
'expression
(append
(kernel-form-identifier-list)
names))])
;; Remove traced app if present
(let ([removing-traced-app
(syntax-case (syntax-disarm e code-insp) (with-continuation-mark traced-app-key)
[(with-continuation-mark traced-app-key val body)
(syntax/loc e body)]
[else
e])])
;; Remove #%app if present...
(syntax-case (syntax-disarm e code-insp) (#%plain-app)
(syntax-case (syntax-disarm removing-traced-app code-insp) (#%plain-app)
[(#%plain-app a ...)
(syntax/loc e (a ...))]
[_else e]))])
(printf "expanded to: ~s\n" (syntax->datum result))
result))
(syntax/loc removing-traced-app (a ...))]
[_else removing-traced-app]))))
exprs)]
[temp-ids (generate-temporaries names)]
[placeholder-ids (generate-temporaries names)]

View File

@ -5,7 +5,8 @@
syntax/kerncase
syntax/struct
racket/struct-info
scheme/include))
scheme/include)
"traced-app.rkt")
(provide shared)

View File

@ -19,6 +19,6 @@
(syntax-span stx))])
(syntax/loc stx
(with-continuation-mark key 'pos
(#%app operator operands ...))))]
(#%plain-app operator operands ...))))]
[else
stx])))