unstable, syntax/parse: fix phase-of-enclosing-module
Was broken because with begin-for-syntax, offset no longer limited to 0 or 1. But now varrefs give module base phase directly.
This commit is contained in:
parent
095b5a5131
commit
350c8214f8
|
@ -85,11 +85,6 @@
|
||||||
(explode-module-path-index y)
|
(explode-module-path-index y)
|
||||||
(list y)))))
|
(list y)))))
|
||||||
|
|
||||||
(define-syntax (phase-of-enclosing-module stx)
|
(define-syntax-rule (phase-of-enclosing-module)
|
||||||
(syntax-case stx ()
|
(variable-reference->module-base-phase
|
||||||
[(poem)
|
(#%variable-reference)))
|
||||||
(let ([phase-within-module (syntax-local-phase-level)])
|
|
||||||
#`(let ([phase-of-this-expression
|
|
||||||
(variable-reference->phase (#%variable-reference))])
|
|
||||||
(- phase-of-this-expression
|
|
||||||
#,(if (zero? phase-within-module) 0 1))))]))
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user