macro-stepper: show errors in provide expansion
closes PR 13018 original commit: 1137b444ad8393cd01faff18602e3facc3322c89
This commit is contained in:
parent
d0712ceee2
commit
2fc13d178d
|
@ -222,12 +222,7 @@
|
||||||
[#:learn (list #'?var)])]
|
[#:learn (list #'?var)])]
|
||||||
|
|
||||||
[(Wrap p:provide (e1 e2 rs ?1 inners ?2))
|
[(Wrap p:provide (e1 e2 rs ?1 inners ?2))
|
||||||
(let ([wrapped-inners
|
(let ([wrapped-inners (map expr->local-action inners)])
|
||||||
(for/list ([inner (in-list inners)])
|
|
||||||
(match inner
|
|
||||||
[(Wrap deriv (e1 e2))
|
|
||||||
(make local-expansion e1 e2
|
|
||||||
#f e1 inner #f e2 #f)]))])
|
|
||||||
(R [! ?1]
|
(R [! ?1]
|
||||||
[#:pattern ?form]
|
[#:pattern ?form]
|
||||||
[#:pass1]
|
[#:pass1]
|
||||||
|
@ -668,7 +663,9 @@
|
||||||
[#:do (DEBUG (printf "** module begin pass 2\n"))]
|
[#:do (DEBUG (printf "** module begin pass 2\n"))]
|
||||||
[ModulePass ?forms pass2]
|
[ModulePass ?forms pass2]
|
||||||
;; ignore pass3 for now: only provides
|
;; ignore pass3 for now: only provides
|
||||||
)]))
|
[#:new-local-context
|
||||||
|
[#:pattern ?form]
|
||||||
|
[LocalActions ?form (map expr->local-action (or pass3 null))]])]))
|
||||||
|
|
||||||
;; ModulePass : (list-of MBRule) -> RST
|
;; ModulePass : (list-of MBRule) -> RST
|
||||||
(define (ModulePass mbrules)
|
(define (ModulePass mbrules)
|
||||||
|
@ -796,6 +793,12 @@
|
||||||
(when #f
|
(when #f
|
||||||
(apply error sym args)))
|
(apply error sym args)))
|
||||||
|
|
||||||
|
(define (expr->local-action d)
|
||||||
|
(match d
|
||||||
|
[(Wrap deriv (e1 e2))
|
||||||
|
(make local-expansion e1 e2
|
||||||
|
#f e1 d #f e2 #f)]))
|
||||||
|
|
||||||
;; opaque-table
|
;; opaque-table
|
||||||
;; Weakly remembers assoc between opaque values and
|
;; Weakly remembers assoc between opaque values and
|
||||||
;; actual syntax, so that actual can be substituted in
|
;; actual syntax, so that actual can be substituted in
|
||||||
|
|
Loading…
Reference in New Issue
Block a user