Typed Racket: reference `#%type-decl' through a module path index

Avoid problems with absolute paths and bytecode files.
This commit is contained in:
Matthew Flatt 2013-07-08 08:24:12 -06:00
parent fb64f06eaf
commit f34a689bd7
2 changed files with 3 additions and 2 deletions

View File

@ -8,7 +8,7 @@
(parameterize ([current-namespace ns]) (parameterize ([current-namespace ns])
(for ([m (in-list to-require)] (for ([m (in-list to-require)]
#:when m) #:when m)
(dynamic-require (collapse-module-path '(submod "." #%type-decl) m) (dynamic-require (module-path-index-join '(submod "." #%type-decl) m)
#f)))) #f))))
(provide add-mod! do-requires) (provide add-mod! do-requires)

View File

@ -392,7 +392,8 @@
(match a (match a
[(list from to) [(list from to)
#`(add-alias (quote-syntax #,from) (quote-syntax #,to))])))) #`(add-alias (quote-syntax #,from) (quote-syntax #,to))]))))
(begin-for-syntax (add-mod! (quote-module-path)))) (begin-for-syntax (add-mod! (variable-reference->module-path-index
(#%variable-reference)))))
#`(begin #`(begin
#,(if (null? (syntax-e #'(new-provs ...))) #,(if (null? (syntax-e #'(new-provs ...)))
#'(begin) #'(begin)