improve source correlation on `require' expansion
This commit is contained in:
parent
4809c11548
commit
14e276094a
|
@ -299,7 +299,7 @@
|
||||||
stx))
|
stx))
|
||||||
(cdr names))))
|
(cdr names))))
|
||||||
namess))
|
namess))
|
||||||
(list (make-import-source (datum->syntax #'simple mod-path) 0)))))]
|
(list (make-import-source (datum->syntax #'simple mod-path #'simple #'simple) 0)))))]
|
||||||
[(id . rest)
|
[(id . rest)
|
||||||
(identifier? #'id)
|
(identifier? #'id)
|
||||||
(let ([t (syntax-local-value #'id (lambda () #f))])
|
(let ([t (syntax-local-value #'id (lambda () #f))])
|
||||||
|
|
|
@ -786,6 +786,24 @@
|
||||||
|
|
||||||
(err/rt-test (syntax-local-lift-require 'abc #'def))
|
(err/rt-test (syntax-local-lift-require 'abc #'def))
|
||||||
|
|
||||||
|
;; ----------------------------------------
|
||||||
|
|
||||||
|
(let ()
|
||||||
|
(define stx
|
||||||
|
(expand #'(module m racket
|
||||||
|
(require (only-in racket/list first)))))
|
||||||
|
|
||||||
|
(define r/ls
|
||||||
|
(syntax-case stx ()
|
||||||
|
[(_mod _m _racket
|
||||||
|
(_mod-begin (_req (_just-meta _0 (_rename rl1 . _whatever))
|
||||||
|
(_only rl2))))
|
||||||
|
(list #'rl1 #'rl2)]))
|
||||||
|
|
||||||
|
(test (list #f #t) map syntax-original? r/ls)
|
||||||
|
(test (list #f #t) map number? (map syntax-position r/ls)))
|
||||||
|
|
||||||
|
|
||||||
;; ----------------------------------------
|
;; ----------------------------------------
|
||||||
|
|
||||||
(report-errs)
|
(report-errs)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user