diff --git a/collects/mzlib/etc.rkt b/collects/mzlib/etc.rkt index da40ab9..f46d907 100644 --- a/collects/mzlib/etc.rkt +++ b/collects/mzlib/etc.rkt @@ -245,7 +245,8 @@ (if (module-path-index? mpi) (module-path-index-resolve mpi) mpi))]) - (let ([name (resolved-module-path-name srcmod)]) + (let* ([name (resolved-module-path-name srcmod)] + [name (if (pair? name) (car name) name)]) (and (path? name) (let-values ([(base name dir?) (split-path name)]) (and (path? base) diff --git a/collects/mzlib/runtime-path.rkt b/collects/mzlib/runtime-path.rkt index 9fb0753..92bf101 100644 --- a/collects/mzlib/runtime-path.rkt +++ b/collects/mzlib/runtime-path.rkt @@ -92,8 +92,14 @@ [vr (caddr p)]) (unless (module-path? p) (error 'runtime-path "not a module path: ~.s" p)) - (module-path-index-join p (and vr - (variable-reference->resolved-module-path vr))))] + (let ([base (and vr + (variable-reference->resolved-module-path vr))]) + (if (and (pair? p) + (eq? (car p) 'submod) + (path? (cadr p))) + (module-path-index-join `(submod "." ,@(cddr p)) + (module-path-index-join (cadr p) base)) + (module-path-index-join p base))))] [else (error 'runtime-path "unknown form: ~.s" p)]))) paths))) @@ -154,9 +160,13 @@ #`(quote #,(hash-ref ext-file-table - (module-path-index-resolve (module-path-index-join - (syntax->datum #'mp) - (syntax-source-module stx))) + (module-path-index-resolve + (let ([p (syntax->datum #'mp)] + [base (syntax-source-module stx)]) + (if (and (pair? p) (eq? (car p) 'submod) (path? (cadr p))) + (module-path-index-join `(submod "." ,@(cddr p)) + (module-path-index-join (cadr p) base)) + (module-path-index-join p base)))) null))])) )