module paths normalize to .rkt, load handler converts .rkt back to .ss if necessary

svn: r18788

original commit: bdb71498e3ed816d44c9faf830f97fbe9fdaa3f2
This commit is contained in:
Matthew Flatt 2010-04-11 16:55:18 +00:00
parent aa3d449185
commit bc29f1ca3c

View File

@ -23,7 +23,15 @@
[else c]))
(define-for-syntax (extract orig-path stx)
(let ([path (resolve-path-spec orig-path orig-path stx)])
(let* ([n-path (resolve-path-spec orig-path orig-path stx)]
[path (if (regexp-match? #rx#"[.]rkt$" (path->bytes n-path))
(if (file-exists? n-path)
n-path
(let ([ss (path-replace-suffix n-path #".ss")])
(if (file-exists? ss)
ss
n-path)))
n-path)])
(let ([s-exp
(parameterize ([current-namespace (make-base-namespace)]
[read-accept-reader #t]